freebsd-nq/test/CodeGenCXX/anonymous-namespaces.cpp
2009-10-14 18:03:49 +00:00

23 lines
402 B
C++

// RUN: clang-cc -emit-llvm %s -o - | FileCheck %s
namespace {
// CHECK: @_ZN12_GLOBAL__N_11aE = internal global i32 0
int a = 0;
// CHECK: define internal i32 @_ZN12_GLOBAL__N_13fooEv()
int foo() {
return 32;
}
// CHECK: define internal i32 @_ZN12_GLOBAL__N_11A3fooEv()
namespace A {
int foo() {
return 45;
}
}
}
int concrete() {
return a + foo() + A::foo();
}