1f4a2713aSLionel Sambuc // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fno-use-cxa-atexit -fapple-kext -emit-llvm -o - %s | FileCheck %s 2f4a2713aSLionel Sambuc 3f4a2713aSLionel Sambuc // CHECK: @_ZN5test01aE = global [[A:%.*]] zeroinitializer 4*0a6a1f1dSLionel Sambuc // CHECK: @llvm.global_ctors = appending global {{.*}} { i32 65535, void ()* [[CTOR0:@.*]], i8* null } 5*0a6a1f1dSLionel Sambuc // CHECK: @llvm.global_dtors = appending global {{.*}} { i32 65535, void ()* [[DTOR0:@.*]], i8* null } 6f4a2713aSLionel Sambuc 7f4a2713aSLionel Sambuc // rdar://11241230 8f4a2713aSLionel Sambuc namespace test0 { 9f4a2713aSLionel Sambuc struct A { A(); ~A(); }; 10f4a2713aSLionel Sambuc A a; 11f4a2713aSLionel Sambuc } 12f4a2713aSLionel Sambuc // CHECK: define internal void [[CTOR0_:@.*]]() 13f4a2713aSLionel Sambuc // CHECK: call void @_ZN5test01AC1Ev([[A]]* @_ZN5test01aE) 14f4a2713aSLionel Sambuc // CHECK-NEXT: ret void 15f4a2713aSLionel Sambuc 16f4a2713aSLionel Sambuc // CHECK: define internal void [[CTOR0]]() 17f4a2713aSLionel Sambuc // CHECK: call void [[CTOR0_]]() 18f4a2713aSLionel Sambuc // CHECK-NEXT: ret void 19f4a2713aSLionel Sambuc 20f4a2713aSLionel Sambuc // CHECK: define internal void [[DTOR0]]() 21f4a2713aSLionel Sambuc // CHECK: call void @_ZN5test01AD1Ev([[A]]* @_ZN5test01aE) 22f4a2713aSLionel Sambuc // CHECK-NEXT: ret void 23