summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/exceptions-seh.c
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-02-11 21:40:48 +0000
committerReid Kleckner <reid@kleckner.net>2015-02-11 21:40:48 +0000
commita593000f0133bccfeabb5f89b8c9d9533d2106bd (patch)
tree9a0e4939e3655257631c64903b577682e3ed207c /clang/test/CodeGen/exceptions-seh.c
parent59c8aa92b8933fdf1cfefdaadc877c7ad640d4cb (diff)
downloadbcm5719-llvm-a593000f0133bccfeabb5f89b8c9d9533d2106bd.tar.gz
bcm5719-llvm-a593000f0133bccfeabb5f89b8c9d9533d2106bd.zip
Add the 'noinline' attribute to call sites within __try bodies
LLVM doesn't support non-call exceptions, so inlining makes it harder to catch such asynchronous exceptions. llvm-svn: 228876
Diffstat (limited to 'clang/test/CodeGen/exceptions-seh.c')
-rw-r--r--clang/test/CodeGen/exceptions-seh.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/test/CodeGen/exceptions-seh.c b/clang/test/CodeGen/exceptions-seh.c
index 98b9de5d59d..ebe97bedd23 100644
--- a/clang/test/CodeGen/exceptions-seh.c
+++ b/clang/test/CodeGen/exceptions-seh.c
@@ -21,7 +21,7 @@ int safe_div(int numerator, int denominator, int *res) {
return success;
}
// CHECK-LABEL: define i32 @safe_div(i32 %numerator, i32 %denominator, i32* %res)
-// CHECK: invoke void @try_body(i32 %{{.*}}, i32 %{{.*}}, i32* %{{.*}})
+// CHECK: invoke void @try_body(i32 %{{.*}}, i32 %{{.*}}, i32* %{{.*}}) #[[NOINLINE:[0-9]+]]
// CHECK: to label %{{.*}} unwind label %[[lpad:[^ ]*]]
//
// CHECK: [[lpad]]
@@ -51,7 +51,7 @@ int filter_expr_capture(void) {
// CHECK-LABEL: define i32 @filter_expr_capture()
// FIXMECHECK: %[[captures]] = call i8* @llvm.frameallocate(i32 4)
// CHECK: store i32 42, i32* %[[r:[^ ,]*]]
-// CHECK: invoke void @j()
+// CHECK: invoke void @j() #[[NOINLINE]]
//
// CHECK: landingpad
// CHECK-NEXT: catch i8* bitcast (i32 (i8*, i8*)* @"\01?filt$0@0@filter_expr_capture@@" to i8*)
@@ -81,7 +81,7 @@ int nested_try(void) {
}
// CHECK-LABEL: define i32 @nested_try()
// CHECK: store i32 42, i32* %[[r:[^ ,]*]]
-// CHECK: invoke void @j()
+// CHECK: invoke void @j() #[[NOINLINE]]
// CHECK: to label %[[cont:[^ ]*]] unwind label %[[lpad:[^ ]*]]
//
// CHECK: [[cont]]
@@ -179,3 +179,5 @@ int except_return(void) {
// CHECK: [[retbb]]
// CHECK: %[[r:[^ ]*]] = load i32* %[[rv]]
// CHECK: ret i32 %[[r]]
+
+// CHECK: attributes #[[NOINLINE]] = { {{.*noinline.*}} }
OpenPOWER on IntegriCloud