[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / CodeGen / exceptions.c
blob93f21799f0e88a77d540b8d40597c558756376e9
1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -Wno-strict-prototypes -emit-llvm -o - %s -fexceptions -fblocks | FileCheck %s
2 // RUN: %clang_cc1 -triple armv7-apple-unknown -Wno-strict-prototypes -emit-llvm -o - %s -fexceptions -exception-model=sjlj -fblocks | FileCheck %s -check-prefix=CHECK-ARM
4 void test1(void) {
5 extern void test1_helper(void (^)(int));
7 // CHECK-LABEL: define{{.*}} void @test1() {{.*}} personality ptr @__gcc_personality_v0
8 // CHECK-ARM-LABEL: define{{.*}} arm_aapcscc void @test1() {{.*}} personality ptr @__gcc_personality_sj0
10 __block int x = 10;
12 // CHECK: invoke void @test1_helper(
13 // CHECK-ARM: invoke arm_aapcscc void @test1_helper(
14 test1_helper(^(int v) { x = v; });
16 // CHECK: landingpad { ptr, i32 }
17 // CHECK-NEXT: cleanup
18 // CHECK-ARM: landingpad { ptr, i32 }
19 // CHECK-ARM-NEXT: cleanup
22 void test2_helper();
23 void test2(void) {
24 __block int x = 10;
25 ^{ (void)x; };
26 test2_helper(5, 6, 7);
28 void test2_helper(int x, int y) {
30 // CHECK: invoke void @test2_helper(i32 noundef 5, i32 noundef 6)