1 // RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | FileCheck %s
3 extern "C" int printf(...);
8 S() : iS(++count
) { printf("S::S(%d)\n", iS
); }
9 ~S() { printf("S::~S(%d)\n", iS
); }
25 // CHECK: call {{.*}} @__cxa_atexit
26 // CHECK: call {{.*}} @__cxa_atexit
27 // CHECK: call {{.*}} @__cxa_atexit
28 // CHECK: call {{.*}} @__cxa_atexit
29 // CHECK: call {{.*}} @__cxa_atexit
30 // CHECK: call {{.*}} @__cxa_atexit
31 // CHECK: call {{.*}} @__cxa_atexit
32 // CHECK: call {{.*}} @__cxa_atexit
39 T t
[2][3] = { 1.0, 2, 3.0, 4, 5.0, 6, 7.0, 8, 9.0, 10, 11.0, 12 };
41 // CHECK: call {{.*}} @__cxa_atexit
42 // CHECK: getelementptr inbounds (%struct.T, ptr @t, i64 6)
43 // CHECK: call void @_ZN1TD1Ev
44 // CHECK: icmp eq {{.*}} @t
45 // CHECK: br i1 {{.*}}
47 static T t2
[2][3] = { 1.0, 2, 3.0, 4, 5.0, 6, 7.0, 8, 9.0, 10, 11.0, 12 };
49 // CHECK: call {{.*}} @__cxa_atexit
50 // CHECK: getelementptr inbounds (%struct.T, ptr @_ZL2t2, i64 6)
51 // CHECK: call void @_ZN1TD1Ev
52 // CHECK: icmp eq {{.*}} @_ZL2t2
53 // CHECK: br i1 {{.*}}
56 U
&&u
= U
{ {{1.0, 2}, {3.0, 4}, {5.0, 6}}, {{7.0, 8}, {9.0, 10}, {11.0, 12}} };
58 // CHECK: call {{.*}} @__cxa_atexit
59 // CHECK: getelementptr inbounds (%struct.T, ptr @_ZGR1u_, i64 6)
60 // CHECK: call void @_ZN1TD1Ev
61 // CHECK: icmp eq {{.*}} @_ZGR1u_
62 // CHECK: br i1 {{.*}}