summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/anonymous-namespaces.cpp
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2009-10-14 18:03:49 +0000
committerrdivacky <rdivacky@FreeBSD.org>2009-10-14 18:03:49 +0000
commit9092c3e0fa01f3139b016d05d267a89e3b07747a (patch)
tree137ebebcae16fb0ce7ab4af456992bbd8d22fced /test/CodeGenCXX/anonymous-namespaces.cpp
parent4981926bf654fe5a2c3893f24ca44106b217e71e (diff)
downloadFreeBSD-src-9092c3e0fa01f3139b016d05d267a89e3b07747a.zip
FreeBSD-src-9092c3e0fa01f3139b016d05d267a89e3b07747a.tar.gz
Update clang to r84119.
Diffstat (limited to 'test/CodeGenCXX/anonymous-namespaces.cpp')
-rw-r--r--test/CodeGenCXX/anonymous-namespaces.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/CodeGenCXX/anonymous-namespaces.cpp b/test/CodeGenCXX/anonymous-namespaces.cpp
new file mode 100644
index 0000000..dcfd518
--- /dev/null
+++ b/test/CodeGenCXX/anonymous-namespaces.cpp
@@ -0,0 +1,22 @@
+// 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();
+}
OpenPOWER on IntegriCloud