summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/arm.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2012-04-06 18:21:06 +0000
committerJohn McCall <rjmccall@apple.com>2012-04-06 18:21:06 +0000
commit30fa3707c440222f65fcbb78ee8677462ea0d9ce (patch)
treebc9373e70233fd57d77f32361c627807ea3f8391 /test/CodeGenCXX/arm.cpp
parent3f88f686e32949ffe02ccb551f482f9cf810358b (diff)
Use atexit when __cxa_atexit isn't available instead of adding a
global destructor entry. For some reason this isn't enabled for apple-kexts; it'd be good to have documentation for that. Based on a patch by Nakamura Takumi! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154191 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/arm.cpp')
-rw-r--r--test/CodeGenCXX/arm.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/test/CodeGenCXX/arm.cpp b/test/CodeGenCXX/arm.cpp
index 36c6c1c6f8..6c60f3057c 100644
--- a/test/CodeGenCXX/arm.cpp
+++ b/test/CodeGenCXX/arm.cpp
@@ -20,9 +20,17 @@ public:
// The global dtor needs the right calling conv with -fno-use-cxa-atexit
// rdar://7817590
-// Checked at end of file.
bar baz;
+// PR9593
+// Make sure atexit(3) is used for global dtors.
+
+// CHECK: call [[BAR:%.*]]* @_ZN3barC1Ev(
+// CHECK-NEXT: call i32 @atexit(void ()* @__dtor_baz)
+
+// CHECK: define internal void @__dtor_baz()
+// CHECK: call [[BAR]]* @_ZN3barD1Ev([[BAR]]* @baz)
+
// Destructors and constructors must return this.
namespace test1 {
void foo();
@@ -357,5 +365,5 @@ namespace test8 {
// CHECK: call void @_ZN5test21CD0Ev(
// CHECK: ret void
-// CHECK: @_GLOBAL__D_a()
-// CHECK: call %class.bar* @_ZN3barD1Ev(%class.bar* @baz)
+// CH_ECK: @_GLOBAL__D_a()
+// CH_ECK: call %class.bar* @_ZN3barD1Ev(%class.bar* @baz)