1 // RUN: %clangxx -target x86_64-apple-darwin10 %s -flto -S -o - |\
2 // RUN: FileCheck --check-prefix=CHECK-NO-KEXT %s
3 // RUN: %clangxx -target x86_64-apple-darwin10 %s -fapple-kext -flto -S -o - |\
4 // RUN: FileCheck --check-prefix=CHECK-KEXT %s
6 // CHECK-NO-KEXT-NOT: _GLOBAL__D_a
7 // CHECK-NO-KEXT: @is_hosted ={{.*}} global
8 // CHECK-NO-KEXT: @_ZTI3foo = {{.*}} @_ZTVN10__cxxabiv117
9 // CHECK-NO-KEXT: call i32 @__cxa_atexit({{.*}} @_ZN3fooD1Ev
10 // CHECK-NO-KEXT: declare i32 @__cxa_atexit
12 // CHECK-KEXT: @_ZTV3foo =
13 // CHECK-KEXT-NOT: @_ZTVN10__cxxabiv117
14 // CHECK-KEXT-NOT: call i32 @__cxa_atexit({{.*}} @_ZN3fooD1Ev
15 // CHECK-KEXT-NOT: declare i32 @__cxa_atexit
16 // CHECK-KEXT: @is_freestanding ={{.*}} global
17 // CHECK-KEXT: _GLOBAL__D_a
18 // CHECK-KEXT: call void @_ZN3fooD1Ev(ptr @a)
29 #if !(__STDC_HOSTED__ == 1)
30 int is_freestanding
= 1;
35 extern "C" void f1() {