Remove FileCheck from test case token_landingpad.ll.
[oota-llvm.git] / test / Feature / exception.ll
index e2635c2de427fe3ff57c39a92074db41db680970..2634692f42527d81e81623b2eec64c0555be1c8c 100644 (file)
@@ -28,108 +28,102 @@ declare i32 @__gxx_personality_v0(...)
 
 define void @cleanupret0() personality i32 (...)* @__gxx_personality_v0 {
 entry:
-  br label %try.cont
-
-try.cont:
   invoke void @_Z3quxv() optsize
-          to label %try.cont unwind label %bb
-bb:
-  cleanuppad void [i7 4]
-  cleanupret i8 0 unwind label %bb
+          to label %exit unwind label %pad
+pad:
+  %cp = cleanuppad within none [i7 4]
+  cleanupret from %cp unwind to caller
+exit:
+  ret void
 }
 
+; forward ref by name
 define void @cleanupret1() personality i32 (...)* @__gxx_personality_v0 {
 entry:
-  br label %try.cont
-
-try.cont:
   invoke void @_Z3quxv() optsize
-          to label %try.cont unwind label %bb
-bb:
-  cleanuppad void [i7 4]
-  cleanupret void unwind label %bb
+          to label %exit unwind label %pad
+cleanup:
+  cleanupret from %cp unwind label %pad
+pad:
+  %cp = cleanuppad within none []
+  br label %cleanup
+exit:
+  ret void
 }
 
+; forward ref by ID
 define void @cleanupret2() personality i32 (...)* @__gxx_personality_v0 {
 entry:
-  cleanupret i8 0 unwind to caller
-}
-
-define void @cleanupret3() personality i32 (...)* @__gxx_personality_v0 {
-  cleanupret void unwind to caller
-}
-
-define void @catchret() personality i32 (...)* @__gxx_personality_v0 {
-entry:
-  br label %bb
-bb:
-  catchret void to label %bb
-}
-
-define i8 @catchpad() personality i32 (...)* @__gxx_personality_v0 {
-entry:
-  br label %try.cont
-
-try.cont:
   invoke void @_Z3quxv() optsize
-          to label %exit unwind label %bb2
-bb:
-  catchret token %cbv to label %exit
-
+          to label %exit unwind label %pad
+cleanup:
+  cleanupret from %0 unwind label %pad
+pad:
+  %0 = cleanuppad within none []
+  br label %cleanup
 exit:
-  ret i8 0
-bb2:
-  %cbv = catchpad token [i7 4] to label %bb unwind label %bb3
-bb3:
-  catchendpad unwind to caller
+  ret void
 }
 
-define void @terminatepad0() personality i32 (...)* @__gxx_personality_v0 {
+define void @catchret0() personality i32 (...)* @__gxx_personality_v0 {
 entry:
-  br label %try.cont
-
-try.cont:
   invoke void @_Z3quxv() optsize
-          to label %try.cont unwind label %bb
-bb:
-  terminatepad [i7 4] unwind label %bb
+          to label %exit unwind label %pad
+pad:
+  %cs1 = catchswitch within none [label %catch] unwind to caller
+catch:
+  %cp = catchpad within %cs1 [i7 4]
+  catchret from %cp to label %exit
+exit:
+  ret void
 }
 
-define void @terminatepad1() personality i32 (...)* @__gxx_personality_v0 {
+; forward ref by name
+define void @catchret1() personality i32 (...)* @__gxx_personality_v0 {
 entry:
-  br label %try.cont
-
-try.cont:
   invoke void @_Z3quxv() optsize
-          to label %try.cont unwind label %bb
-bb:
-  terminatepad [i7 4] unwind to caller
+          to label %exit unwind label %pad
+catchret:
+  catchret from %cp to label %exit
+pad:
+  %cs1 = catchswitch within none [label %catch] unwind to caller
+catch:
+  %cp = catchpad within %cs1 [i7 4]
+  br label %catchret
+exit:
+  ret void
 }
 
-define void @cleanuppad() personality i32 (...)* @__gxx_personality_v0 {
+; forward ref by ID
+define void @catchret2() personality i32 (...)* @__gxx_personality_v0 {
 entry:
-  br label %try.cont
-
-try.cont:
   invoke void @_Z3quxv() optsize
-          to label %try.cont unwind label %bb
-bb:
-  cleanuppad void [i7 4]
+          to label %exit unwind label %pad
+catchret:
+  catchret from %0 to label %exit
+pad:
+  %cs1 = catchswitch within none [label %catch] unwind to caller
+catch:
+  %0 = catchpad within %cs1 [i7 4]
+  br label %catchret
+exit:
   ret void
 }
 
-define void @catchendpad0() personality i32 (...)* @__gxx_personality_v0 {
+define i8 @catchpad() personality i32 (...)* @__gxx_personality_v0 {
 entry:
-  br label %try.cont
-
-try.cont:
   invoke void @_Z3quxv() optsize
-          to label %try.cont unwind label %bb
-bb:
-  catchendpad unwind label %bb
+          to label %exit unwind label %bb2
+bb2:
+  %cs1 = catchswitch within none [label %catch] unwind to caller
+catch:
+  catchpad within %cs1 [i7 4]
+  br label %exit
+exit:
+  ret i8 0
 }
 
-define void @catchendpad1() personality i32 (...)* @__gxx_personality_v0 {
+define void @cleanuppad() personality i32 (...)* @__gxx_personality_v0 {
 entry:
   br label %try.cont
 
@@ -137,5 +131,6 @@ try.cont:
   invoke void @_Z3quxv() optsize
           to label %try.cont unwind label %bb
 bb:
-  catchendpad unwind to caller
+  cleanuppad within none [i7 4]
+  ret void
 }