1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fno-use-cxa-atexit -fapple-kext -emit-llvm -o - %s | FileCheck %s
3 // CHECK: @_ZN5test01aE ={{.*}} global [[A:%.*]] zeroinitializer
4 // CHECK: @llvm.global_ctors = appending global {{.*}} { i32 65535, ptr [[CTOR0:@.*]], ptr null }
5 // CHECK: @llvm.global_dtors = appending global {{.*}} { i32 65535, ptr [[DTOR0:@.*]], ptr null }
7 // Check that the base destructor is marked as always_inline when generating
10 namespace testBaseDestructor
{
11 #pragma clang optimize off
17 #pragma clang optimize on
20 // CHECK: define{{.*}} void @_ZN18testBaseDestructor1DD2Ev({{.*}}) unnamed_addr #[[ATTR0:.*]] align 2 {
22 // CHECK: define{{.*}} void @_ZN18testBaseDestructor1DD1Ev({{.*}}) unnamed_addr #[[ATTR1:.*]] align 2 {
24 // CHECK: define{{.*}} void @_ZN18testBaseDestructor1DD0Ev({{.*}}) unnamed_addr #[[ATTR1]] align 2 {
26 struct A
{ A(); ~A(); };
29 // CHECK: define internal void [[CTOR0_:@.*]]()
30 // CHECK: call void @_ZN5test01AC1Ev(ptr {{[^,]*}} @_ZN5test01aE)
31 // CHECK-NEXT: ret void
33 // CHECK: define internal void [[CTOR0]]()
34 // CHECK: call void [[CTOR0_]]()
35 // CHECK-NEXT: ret void
37 // CHECK: define internal void [[DTOR0]]()
38 // CHECK: call void @_ZN5test01AD1Ev(ptr @_ZN5test01aE)
39 // CHECK-NEXT: ret void
41 // CHECK: attributes #[[ATTR0]] = { alwaysinline mustprogress nounwind {{.*}} }
42 // CHECK: attributes #[[ATTR1]] = { mustprogress noinline nounwind {{.*}} }