summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/exceptions-seh.c
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-04-10 17:34:52 +0000
committerReid Kleckner <reid@kleckner.net>2015-04-10 17:34:52 +0000
commit11859afd5fe485e95d73eaffebb26024d372ac3c (patch)
tree80dc8f33a7391afe55e0d8d4d1daaa71cee9e26a /clang/test/CodeGen/exceptions-seh.c
parent0aa128e219131558a4dbbcfa02315486069b3b91 (diff)
downloadbcm5719-llvm-11859afd5fe485e95d73eaffebb26024d372ac3c.tar.gz
bcm5719-llvm-11859afd5fe485e95d73eaffebb26024d372ac3c.zip
[SEH] Re-land r234532, but use internal linkage for all SEH helpers
Even though these symbols are in a comdat group, the Microsoft linker really wants them to have internal linkage. I'm planning to tweak the mangling in a follow-up change. This is a straight revert with a 1-line fix. llvm-svn: 234613
Diffstat (limited to 'clang/test/CodeGen/exceptions-seh.c')
-rw-r--r--clang/test/CodeGen/exceptions-seh.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/clang/test/CodeGen/exceptions-seh.c b/clang/test/CodeGen/exceptions-seh.c
index 2d9d4b1f018..9a273ced567 100644
--- a/clang/test/CodeGen/exceptions-seh.c
+++ b/clang/test/CodeGen/exceptions-seh.c
@@ -118,8 +118,6 @@ int nested_try(void) {
// CHECK: [[inner_try_cont]]
// CHECK: br label %[[outer_try_cont]]
-// FIXME: This lowering of __finally can't actually work, it will have to
-// change.
static unsigned g = 0;
void basic_finally(void) {
++g;
@@ -138,24 +136,23 @@ void basic_finally(void) {
// CHECK: to label %[[cont:[^ ]*]] unwind label %[[lpad:[^ ]*]]
//
// CHECK: [[cont]]
-// CHECK: br label %[[finally:[^ ]*]]
-//
-// CHECK: [[finally]]
-// CHECK: load i32, i32* @g
-// CHECK: add i32 %{{.*}}, -1
-// CHECK: store i32 %{{.*}}, i32* @g
-// CHECK: icmp eq
-// CHECK: br i1 %{{.*}}, label
-//
+// CHECK: %[[fp:[^ ]*]] = call i8* @llvm.frameaddress(i32 0)
+// CHECK: call void @"\01?fin$0@0@basic_finally@@"(i1 zeroext false, i8* %[[fp]])
// CHECK: ret void
//
// CHECK: [[lpad]]
// CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*)
// CHECK-NEXT: cleanup
-// CHECK: br label %[[finally]]
-//
+// CHECK: %[[fp:[^ ]*]] = call i8* @llvm.frameaddress(i32 0)
+// CHECK: call void @"\01?fin$0@0@basic_finally@@"(i1 zeroext true, i8* %[[fp]])
// CHECK: resume
+// CHECK: define internal void @"\01?fin$0@0@basic_finally@@"(i1 zeroext %abnormal_termination, i8* %frame_pointer)
+// CHECK: load i32, i32* @g, align 4
+// CHECK: add i32 %{{.*}}, -1
+// CHECK: store i32 %{{.*}}, i32* @g, align 4
+// CHECK: ret void
+
int returns_int(void);
int except_return(void) {
__try {
OpenPOWER on IntegriCloud