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
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
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
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)