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