diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-11-18 14:59:57 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-11-18 14:59:57 +0000 |
commit | 741c13ecc20fb35b836ad690aeecd402f002d654 (patch) | |
tree | 60a1694bec5a44d15456acc880cb2f91619f66aa /test/CodeGenCXX/global-array-destruction.cpp | |
parent | b3a51061b1b9c4add078237850649f7c9efb13ab (diff) | |
download | FreeBSD-src-741c13ecc20fb35b836ad690aeecd402f002d654.zip FreeBSD-src-741c13ecc20fb35b836ad690aeecd402f002d654.tar.gz |
Update clang to r89205.
Diffstat (limited to 'test/CodeGenCXX/global-array-destruction.cpp')
-rw-r--r-- | test/CodeGenCXX/global-array-destruction.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/CodeGenCXX/global-array-destruction.cpp b/test/CodeGenCXX/global-array-destruction.cpp new file mode 100644 index 0000000..ebea9c1 --- /dev/null +++ b/test/CodeGenCXX/global-array-destruction.cpp @@ -0,0 +1,33 @@ +// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s +// RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s + +extern "C" int printf(...); + +int count; + +struct S { + S() : iS(++count) { printf("S::S(%d)\n", iS); } + ~S() { printf("S::~S(%d)\n", iS); } + int iS; +}; + + +S arr[2][1]; +S s1; +S arr1[3]; +static S sarr[4]; + +int main () {} +S arr2[2]; +static S sarr1[4]; +S s2; +S arr3[3]; + +// CHECK-LP64: call ___cxa_atexit +// CHECK-LP64: call ___cxa_atexit +// CHECK-LP64: call ___cxa_atexit +// CHECK-LP64: call ___cxa_atexit +// CHECK-LP64: call ___cxa_atexit +// CHECK-LP64: call ___cxa_atexit +// CHECK-LP64: call ___cxa_atexit +// CHECK-LP64: call ___cxa_atexit |