summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/internal-linkage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/internal-linkage.cpp')
-rw-r--r--test/CodeGenCXX/internal-linkage.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGenCXX/internal-linkage.cpp b/test/CodeGenCXX/internal-linkage.cpp
new file mode 100644
index 0000000..1ae0f08
--- /dev/null
+++ b/test/CodeGenCXX/internal-linkage.cpp
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+
+struct Global { };
+template<typename T> struct X { };
+
+
+namespace {
+ struct Anon { };
+
+ // CHECK: @_ZN12_GLOBAL__N_15anon0E = internal global
+ Global anon0;
+}
+
+// CHECK: @anon1 = internal global
+Anon anon1;
+
+// CHECK: @anon2 = internal global
+X<Anon> anon2;
+
OpenPOWER on IntegriCloud