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 {
28 struct A
{ A(); ~A(); };
31 // CHECK: define internal void [[CTOR0_:@.*]]()
32 // CHECK: call void @_ZN5test01AC1Ev(ptr {{[^,]*}} @_ZN5test01aE)
33 // CHECK-NEXT: ret void
35 // CHECK: define internal void [[CTOR0]]()
36 // CHECK: call void [[CTOR0_]]()
37 // CHECK-NEXT: ret void
39 // CHECK: define internal void [[DTOR0]]()
40 // CHECK: call void @_ZN5test01AD1Ev(ptr @_ZN5test01aE)
41 // CHECK-NEXT: ret void
43 // CHECK: attributes #[[ATTR0]] = { alwaysinline nounwind {{.*}} }
44 // CHECK: attributes #[[ATTR1]] = { noinline nounwind {{.*}} }