summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/anonymous-namespaces.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
committerdim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
commit952eddef9aff85b1e92626e89baaf7a360e2ac85 (patch)
treedf8df0b0067b381eab470a3b8f28d14a552a6340 /test/CodeGenCXX/anonymous-namespaces.cpp
parentea266cad53e3d49771fa38103913d3ec7a166694 (diff)
downloadFreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.zip
FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.tar.gz
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
Diffstat (limited to 'test/CodeGenCXX/anonymous-namespaces.cpp')
-rw-r--r--test/CodeGenCXX/anonymous-namespaces.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/test/CodeGenCXX/anonymous-namespaces.cpp b/test/CodeGenCXX/anonymous-namespaces.cpp
index 32e17a3..abc700f 100644
--- a/test/CodeGenCXX/anonymous-namespaces.cpp
+++ b/test/CodeGenCXX/anonymous-namespaces.cpp
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -triple x86_64-apple-darwin10 -emit-llvm %s -o - > %t
-// RUN: FileCheck %s -check-prefix=1 < %t
-// RUN: FileCheck %s -check-prefix=2 < %t
+// RUN: FileCheck %s -check-prefix=CHECK-1 < %t
+// RUN: FileCheck %s -check-prefix=CHECK-2 < %t
int f();
@@ -28,12 +28,12 @@ namespace {
struct E : public virtual EBase { virtual ~E() {} };
};
- // CHECK-1: define internal i32 @_ZN12_GLOBAL__N_13fooEv()
+ // CHECK-1-LABEL: define internal i32 @_ZN12_GLOBAL__N_13fooEv()
int foo() {
return 32;
}
- // CHECK-1: define internal i32 @_ZN12_GLOBAL__N_11A3fooEv()
+ // CHECK-1-LABEL: define internal i32 @_ZN12_GLOBAL__N_11A3fooEv()
namespace A {
int foo() {
return 45;
@@ -58,11 +58,20 @@ namespace test2 {
struct C;
}
- // CHECK-2: define void @_ZN5test24testEv()
+ // CHECK-2-LABEL: define void @_ZN5test24testEv()
// CHECK-2: call void @_ZN5test21A1BINS_12_GLOBAL__N_11CEE3fooEv()
void test() {
A::B<C>::foo();
}
- // CHECK-2: define internal void @_ZN5test21A1BINS_12_GLOBAL__N_11CEE3fooEv()
+ // CHECK-2-LABEL: define internal void @_ZN5test21A1BINS_12_GLOBAL__N_11CEE3fooEv()
}
+
+namespace {
+
+int bar() {
+ extern int a;
+ return a;
+}
+
+} // namespace
OpenPOWER on IntegriCloud