blob: 03506a8aacf505517027c717b857a17e9d984061 [file] [log] [blame]
John McCall74446392012-04-13 02:53:27 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fno-use-cxa-atexit -fapple-kext -emit-llvm -o - %s | FileCheck %s
2
3// CHECK: @_ZN5test01aE = global [[A:%.*]] zeroinitializer
4// CHECK: @llvm.global_ctors = appending global {{.*}} { i32 65535, void ()* [[CTOR0:@.*]] }
5// CHECK: @llvm.global_dtors = appending global {{.*}} { i32 65535, void ()* [[DTOR0:@.*]] }
6
7// rdar://11241230
8namespace test0 {
9 struct A { A(); ~A(); };
10 A a;
11}
12// CHECK: define internal void [[CTOR0_:@.*]]()
13// CHECK: call void @_ZN5test01AC1Ev([[A]]* @_ZN5test01aE)
14// CHECK-NEXT: ret void
15
16// CHECK: define internal void [[CTOR0]]()
17// CHECK: call void [[CTOR0_]]()
18// CHECK-NEXT: ret void
19
20// CHECK: define internal void [[DTOR0]]()
21// CHECK: call void @_ZN5test01AD1Ev([[A]]* @_ZN5test01aE)
22// CHECK-NEXT: ret void