1 // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
2 // CHECK: -[A .cxx_construct]
3 // CHECK: -[A .cxx_destruct]
4 // CHECK: -[B .cxx_construct]
5 // CHECK-NOT: -[B .cxx_destruct]
6 // CHECK-NOT: -[C .cxx_construct]
7 // CHECK: -[C .cxx_destruct]
15 extern "C" int printf(const char *, ...);
19 X() : value(count++) { printf( "X::X()\n"); }
20 ~X() { printf( "X::~X()\n"); }
25 Y() : value(count++) { printf( "Y::Y()\n"); }
26 ~Y() { printf( "Y::~Y()\n"); }
30 @interface Super : NSObject {
38 @interface A : Super {
51 printf( "yvar.value = %d\n", yvar.value);
52 printf( "yvar1.value = %d\n", yvar1.value);
53 printf( "ya[0..2] = %d %d %d\n", ya[0].value, ya[1].value, ya[2].value);
60 printf( "xvar.value = %d\n", xvar.value);
61 printf( "xvar1.value = %d\n", xvar1.value);
62 printf( "xvar2.value = %d\n", xvar2.value);
63 printf( "xa[0..1][0..1] = %d %d %d %d\n",
64 xa[0][0].value, xa[0][1].value, xa[1][0].value, xa[1][1].value);
67 - (void)finalize { [super finalize]; }
71 A *a = [[A alloc] init];
78 S& operator = (const S&);
84 @property(assign, nonatomic) S position;
91 // This class should have a .cxx_construct but no .cxx_destruct.
92 namespace test3 { struct S { S(); }; }
98 // This class should have a .cxx_destruct but no .cxx_construct.
99 namespace test4 { struct S { ~S(); }; }