summaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/global-array-destruction.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
committerDimitry Andric <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
commit56d91b49b13fe55c918afbda19f6165b5fbff87a (patch)
tree9abb1a658a297776086f4e0dfa6ca533de02104e /test/CodeGenCXX/global-array-destruction.cpp
parent41e20f564abdb05101d6b2b29c59459a966c22cc (diff)
Notes
Diffstat (limited to 'test/CodeGenCXX/global-array-destruction.cpp')
-rw-r--r--test/CodeGenCXX/global-array-destruction.cpp33
1 files changed, 22 insertions, 11 deletions
diff --git a/test/CodeGenCXX/global-array-destruction.cpp b/test/CodeGenCXX/global-array-destruction.cpp
index 5b5dfac0f228..076ef942201d 100644
--- a/test/CodeGenCXX/global-array-destruction.cpp
+++ b/test/CodeGenCXX/global-array-destruction.cpp
@@ -1,6 +1,4 @@
-// REQUIRES: x86-64-registered-target
-// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -S %s -o %t-64.s
-// RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | FileCheck %s
extern "C" int printf(...);
@@ -24,11 +22,24 @@ static S sarr1[4];
S s2;
S arr3[3];
-// CHECK-LP64: callq ___cxa_atexit
-// CHECK-LP64: callq ___cxa_atexit
-// CHECK-LP64: callq ___cxa_atexit
-// CHECK-LP64: callq ___cxa_atexit
-// CHECK-LP64: callq ___cxa_atexit
-// CHECK-LP64: callq ___cxa_atexit
-// CHECK-LP64: callq ___cxa_atexit
-// CHECK-LP64: callq ___cxa_atexit
+// CHECK: call {{.*}} @__cxa_atexit
+// CHECK: call {{.*}} @__cxa_atexit
+// CHECK: call {{.*}} @__cxa_atexit
+// CHECK: call {{.*}} @__cxa_atexit
+// CHECK: call {{.*}} @__cxa_atexit
+// CHECK: call {{.*}} @__cxa_atexit
+// CHECK: call {{.*}} @__cxa_atexit
+// CHECK: call {{.*}} @__cxa_atexit
+
+struct T {
+ double d;
+ int n;
+ ~T();
+};
+T t[2][3] = { 1.0, 2, 3.0, 4, 5.0, 6, 7.0, 8, 9.0, 10, 11.0, 12 };
+
+// CHECK: call {{.*}} @__cxa_atexit
+// CHECK: getelementptr inbounds ({{.*}} bitcast {{.*}}* @t to %struct.T*), i64 6
+// CHECK: call void @_ZN1TD1Ev
+// CHECK: icmp eq {{.*}} @t
+// CHECK: br i1 {{.*}}