summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/init-priority-attr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/init-priority-attr.cpp')
-rw-r--r--test/CodeGenCXX/init-priority-attr.cpp26
1 files changed, 16 insertions, 10 deletions
diff --git a/test/CodeGenCXX/init-priority-attr.cpp b/test/CodeGenCXX/init-priority-attr.cpp
index ef9343c..ff155d0 100644
--- a/test/CodeGenCXX/init-priority-attr.cpp
+++ b/test/CodeGenCXX/init-priority-attr.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
-// PR
+// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -O2 -emit-llvm -o - | FileCheck %s
+// PR11480
void foo(int);
@@ -27,18 +27,24 @@ public:
A C::a = A();
-// CHECK: @llvm.global_ctors = appending global [3 x { i32, void ()* }] [{ i32, void ()* } { i32 200, void ()* @_GLOBAL__I_000200 }, { i32, void ()* } { i32 300, void ()* @_GLOBAL__I_000300 }, { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I_a }]
+// CHECK: @llvm.global_ctors = appending global [3 x { i32, void ()*, i8* }]
+// CHECK: [{ i32, void ()*, i8* } { i32 200, void ()* @_GLOBAL__I_000200, i8* null },
+// CHECK: { i32, void ()*, i8* } { i32 300, void ()* @_GLOBAL__I_000300, i8* null },
+// CHECK: { i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_init_priority_attr.cpp, i8* null }]
// CHECK: _GLOBAL__I_000200()
-// CHECK_NEXT: _Z3fooi(i32 3)
+// CHECK: _Z3fooi(i32 3)
+// CHECK-NEXT: ret void
// CHECK: _GLOBAL__I_000300()
-// CHECK_NEXT: _Z3fooi(i32 2)
-// CHECK_NEXT: _Z3fooi(i32 1)
-
-// CHECK: _GLOBAL__I_a()
-// CHECK_NEXT: _Z3fooi(i32 1)
-// CHECK_NEXT: _Z3fooi(i32 4)
+// CHECK: _Z3fooi(i32 2)
+// CHECK-NEXT: _Z3fooi(i32 1)
+// CHECK-NEXT: ret void
+
+// CHECK: _GLOBAL__sub_I_init_priority_attr.cpp()
+// CHECK: _Z3fooi(i32 1)
+// CHECK-NEXT: _Z3fooi(i32 4)
+// CHECK-NEXT: ret void
C c;
A1 a1 __attribute__((init_priority (300)));
OpenPOWER on IntegriCloud