37 lines · c
1// RUN: %clang_cc1 -triple armv7-apple-unknown -Wno-strict-prototypes -ffp-exception-behavior=strict -fexperimental-strict-floating-point -emit-llvm -o - %s -fexceptions -exception-model=sjlj -fblocks | FileCheck %s2 3// Verify strictfp attributes on invoke calls (and therefore also on4// function definitions).5 6void test1(void) {7 extern void test1_helper(void (^)(int));8 9 // CHECK: define{{.*}} arm_aapcscc void @test1() [[STRICTFP0:#[0-9]+]] personality ptr @__gcc_personality_sj010 11 __block int x = 10;12 13 // CHECK: invoke arm_aapcscc void @test1_helper({{.*}}) [[STRICTFP1:#[0-9]+]]14 test1_helper(^(int v) { x = v; });15 16 // CHECK: landingpad { ptr, i32 }17 // CHECK-NEXT: cleanup18}19 20void test2_helper();21void test2(void) {22 // CHECK: define{{.*}} arm_aapcscc void @test2() [[STRICTFP0]] personality ptr @__gcc_personality_sj0 {23 __block int x = 10;24 ^{ (void)x; };25 26 // CHECK: invoke arm_aapcscc void @test2_helper({{.*}}) [[STRICTFP1:#[0-9]+]]27 test2_helper(5, 6, 7);28 29 // CHECK: landingpad { ptr, i32 }30 // CHECK-NEXT: cleanup31}32void test2_helper(int x, int y) {33}34 35// CHECK: attributes [[STRICTFP0]] = { {{.*}}strictfp{{.*}} }36// CHECK: attributes [[STRICTFP1]] = { strictfp }37