diff options
author | John McCall <rjmccall@apple.com> | 2012-04-06 18:21:06 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2012-04-06 18:21:06 +0000 |
commit | 76cc43a2a471f921efc3db52d0a5134f75fe6190 (patch) | |
tree | 2c9d1e31d0e64348c68ad9db5ea50540c6650d71 /clang/test/CodeGenCXX/arm.cpp | |
parent | ee08c534788849e505c3c357fd4f4205b6f3fe99 (diff) | |
download | bcm5719-llvm-76cc43a2a471f921efc3db52d0a5134f75fe6190.tar.gz bcm5719-llvm-76cc43a2a471f921efc3db52d0a5134f75fe6190.zip |
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!
llvm-svn: 154191
Diffstat (limited to 'clang/test/CodeGenCXX/arm.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/arm.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/clang/test/CodeGenCXX/arm.cpp b/clang/test/CodeGenCXX/arm.cpp index 36c6c1c6f8c..6c60f3057c1 100644 --- a/clang/test/CodeGenCXX/arm.cpp +++ b/clang/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) |