summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/global-llvm-constant.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/global-llvm-constant.cpp')
-rw-r--r--test/CodeGenCXX/global-llvm-constant.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGenCXX/global-llvm-constant.cpp b/test/CodeGenCXX/global-llvm-constant.cpp
new file mode 100644
index 0000000..bd43196
--- /dev/null
+++ b/test/CodeGenCXX/global-llvm-constant.cpp
@@ -0,0 +1,10 @@
+// RUN: clang-cc -emit-llvm -o - %s | FileCheck %s
+
+struct A {
+ A() { x = 10; }
+ int x;
+};
+
+const A x;
+
+// CHECK: @x = internal global
OpenPOWER on IntegriCloud