r230514 - Make __leave test pass in -Asserts builds.
Nico Weber
nicolasweber at gmx.de
Wed Feb 25 09:44:04 PST 2015
Author: nico
Date: Wed Feb 25 11:44:04 2015
New Revision: 230514
URL: http://llvm.org/viewvc/llvm-project?rev=230514&view=rev
Log:
Make __leave test pass in -Asserts builds.
Modified:
cfe/trunk/test/CodeGen/exceptions-seh-leave.c
Modified: cfe/trunk/test/CodeGen/exceptions-seh-leave.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/exceptions-seh-leave.c?rev=230514&r1=230513&r2=230514&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/exceptions-seh-leave.c (original)
+++ cfe/trunk/test/CodeGen/exceptions-seh-leave.c Wed Feb 25 11:44:04 2015
@@ -1,8 +1,5 @@
// RUN: %clang_cc1 %s -triple x86_64-pc-win32 -fms-extensions -emit-llvm -o - | FileCheck %s
-// FIXME: Rewrite CHECKs for unnamed BBs and Insts.
-// REQUIRES: asserts
-
void g();
//////////////////////////////////////////////////////////////////////////////
@@ -22,9 +19,9 @@ int __leave_with___except_simple() {
}
// CHECK-LABEL: define i32 @__leave_with___except_simple()
// CHECK: store i32 15, i32* %myres
-// CHECK-NEXT: br label %__try.__leave
+// CHECK-NEXT: br label %[[tryleave:[^ ]*]]
// CHECK-NOT: store i32 23
-// CHECK: __try.__leave:
+// CHECK: [[tryleave]]
// CHECK-NEXT: ret i32 1
@@ -48,10 +45,10 @@ int __leave_with___except() {
// keeps the CodeGen code simpler, __leave is very rare, and SimplifyCFG will
// simplify this anyways.
// CHECK: [[cont]]
-// CHECK-NEXT: br label %__try.__leave
+// CHECK-NEXT: br label %[[tryleave:[^ ]*]]
// CHECK-NOT: store i32 23
-// CHECK: __try.__leave:
-// CHECK-NEXT: br label %__try.cont
+// CHECK: [[tryleave]]
+// CHECK-NEXT: br label %
//////////////////////////////////////////////////////////////////////////////
@@ -74,11 +71,11 @@ int __leave_with___finally_simple() {
}
// CHECK-LABEL: define i32 @__leave_with___finally_simple()
// CHECK: store i32 15, i32* %myres
-// CHECK-NEXT: br label %__try.__leave
+// CHECK-NEXT: br label %[[tryleave:[^ ]*]]
// CHECK-NOT: store i32 23
-// CHECK: __try.__leave:
-// CHECK-NEXT: store i8 0, i8* %abnormal.termination.slot
-// CHECK-NEXT: br label %__finally
+// CHECK: [[tryleave]]
+// CHECK-NEXT: store i8 0, i8* %
+// CHECK-NEXT: br label %
// __finally block doesn't return, __finally.cont doesn't exist.
int __leave_with___finally_noreturn() {
@@ -94,11 +91,11 @@ int __leave_with___finally_noreturn() {
}
// CHECK-LABEL: define i32 @__leave_with___finally_noreturn()
// CHECK: store i32 15, i32* %myres
-// CHECK-NEXT: br label %__try.__leave
+// CHECK-NEXT: br label %[[tryleave:[^ ]*]]
// CHECK-NOT: store i32 23
-// CHECK: __try.__leave:
-// CHECK-NEXT: store i8 0, i8* %abnormal.termination.slot
-// CHECK-NEXT: br label %__finally
+// CHECK: [[tryleave]]
+// CHECK-NEXT: store i8 0, i8* %
+// CHECK-NEXT: br label %
// The "normal" case.
int __leave_with___finally() {
@@ -118,11 +115,11 @@ int __leave_with___finally() {
// For __finally, there needs to be an explicit __try.__leave, because
// abnormal.termination.slot needs to be set there.
// CHECK: [[cont]]
-// CHECK-NEXT: br label %__try.__leave
+// CHECK-NEXT: br label %[[tryleave:[^ ]*]]
// CHECK-NOT: store i32 23
-// CHECK: __try.__leave:
-// CHECK-NEXT: store i8 0, i8* %abnormal.termination.slot
-// CHECK-NEXT: br label %__finally
+// CHECK: [[tryleave]]
+// CHECK-NEXT: store i8 0, i8* %
+// CHECK-NEXT: br label %
//////////////////////////////////////////////////////////////////////////////
@@ -153,31 +150,34 @@ int nested___except___finally() {
// CHECK-LABEL: invoke void bitcast (void (...)* @g to void ()*)()
// CHECK-NEXT: to label %[[g1_cont:.*]] unwind label %[[g1_lpad:.*]]
-// CHECK: [[g1_cont]]:
-// CHECK-NEXT: store i8 0, i8* %abnormal.termination.slot
-// CHECK-NEXT: br label %__finally
+// CHECK: [[g1_cont]]
+// CHECK-NEXT: store i8 0, i8* %[[abnormal:[^ ]*]]
+// CHECK-NEXT: br label %[[finally:[^ ]*]]
-// CHECK-LABEL: __finally:
-// CHECK-NEXT: invoke void bitcast (void (...)* @g to void ()*)() #3
+// CHECK: [[finally]]
+// CHECK-NEXT: invoke void bitcast (void (...)* @g to void ()*)()
// CHECK-NEXT: to label %[[g2_cont:.*]] unwind label %[[g2_lpad:.*]]
-// CHECK: [[g2_cont]]:
+// CHECK: [[g2_cont]]
+// CHECK-NEXT: br label %[[tryleave:[^ ]*]]
// CHECK-NOT: store i32 23
-// CHECK: br label %__try.__leave
-// CHECK: [[g1_lpad]]:
-// CHECK: store i8 1, i8* %abnormal.termination.slot
-// CHECK-NEXT: br label %__finally
+// CHECK: [[g1_lpad]]
+// CHECK: store i8 1, i8* %
+// CHECK-NEXT: br label %[[finally]]
+
+// CHECK: [[g2_lpad]]
+// CHECK-NOT: %[[abnormal]]
+// CHECK: br label %[[except:[^ ]*]]
-// CHECK: [[g2_lpad]]:
-// CHECK-NOT: %abnormal.termination.slot
-// CHECK: br label %__except
+// CHECK: [[except]]
+// CHECK-NEXT: br label %[[trycont:[^ ]*]]
-// CHECK-LABEL: __except:
-// CHECK-NEXT: br label %__try.cont
+// CHECK: [[trycont]]
+// CHECK-NEXT: ret i32 1
-// CHECK-LABEL: __try.__leave:
-// CHECK-NEXT: br label %__try.cont
+// CHECK: [[tryleave]]
+// CHECK-NEXT: br label %[[trycont]]
int nested___except___except() {
int myres = 0;
@@ -203,30 +203,33 @@ int nested___except___except() {
// CHECK-LABEL: invoke void bitcast (void (...)* @g to void ()*)()
// CHECK-NEXT: to label %[[g1_cont:.*]] unwind label %[[g1_lpad:.*]]
-// CHECK: [[g1_cont]]:
+// CHECK: [[g1_cont]]
// CHECK: store i32 16, i32* %myres
-// CHECK-NEXT: br label %__try.cont
+// CHECK-NEXT: br label %[[trycont:[^ ]*]]
-// CHECK: [[g1_lpad]]:
-// CHECK: br label %__except
+// CHECK: [[g1_lpad]]
+// CHECK: br label %[[except:[^ ]*]]
-// CHECK-LABEL: __except:
+// CHECK: [[except]]
// CHECK-NEXT: invoke void bitcast (void (...)* @g to void ()*)() #3
// CHECK-NEXT: to label %[[g2_cont:.*]] unwind label %[[g2_lpad:.*]]
-// CHECK: [[g2_cont]]:
+// CHECK: [[g2_cont]]
+// CHECK-NEXT: br label %[[tryleave:[^ ]*]]
// CHECK-NOT: store i32 23
-// CHECK: br label %__try.__leave
-// CHECK: [[g2_lpad]]:
-// CHECK: br label %__except3
+// CHECK: [[g2_lpad]]
+// CHECK: br label %[[outerexcept:[^ ]*]]
+
+// CHECK: [[outerexcept]]
+// CHECK-NEXT: br label %[[trycont4:[^ ]*]]
-// CHECK-LABEL: __except3:
-// CHECK-NEXT: br label %__try.cont4
+// CHECK: [[trycont4]]
+// CHECK-NEXT: ret i32 1
-// CHECK-LABEL: __try.cont:
+// CHECK: [[trycont]]
// CHECK-NEXT: store i32 51, i32* %myres
-// CHECK-NEXT: br label %__try.__leave
+// CHECK-NEXT: br label %[[tryleave]]
-// CHECK-LABEL: __try.__leave:
-// CHECK-NEXT: br label %__try.cont4
+// CHECK: [[tryleave]]
+// CHECK-NEXT: br label %[[trycont4]]
More information about the cfe-commits
mailing list