[IR] Reformulate LLVM's EH funclet IR
[oota-llvm.git] / test / CodeGen / WinEH / wineh-intrinsics.ll
index acdeb796ac19321468d3b814f751ab8f0b25efd5..3658792a384361cee5aa442e151bd0e73d5dff88 100644 (file)
@@ -15,13 +15,12 @@ entry:
   invoke void (...) @f(i32 1)
      to label %exit unwind label %catchpad
 catchpad:
-  %catch = catchpad [i32 1] to label %do_catch unwind label %catchend
+  %cs1 = catchswitch within none [label %do_catch] unwind to caller
 do_catch:
+  %catch = catchpad within %cs1 [i32 1]
   %exn = call i8* @llvm.eh.exceptionpointer.p0i8(token %catch)
   call void (...) @f(i8* %exn)
-  catchret %catch to label %exit
-catchend:
-  catchendpad unwind to caller
+  catchret from %catch to label %exit
 exit:
   ret void
 }
@@ -31,13 +30,12 @@ entry:
   invoke void (...) @f(i32 1)
      to label %exit unwind label %catchpad
 catchpad:
-  %catch = catchpad [i32 1] to label %do_catch unwind label %catchend
+  %cs1 = catchswitch within none [label %do_catch] unwind to caller
 do_catch:
+  %catch = catchpad within %cs1 [i32 1]
   %exn = call i8 addrspace(1)* @llvm.eh.exceptionpointer.p1i8(token %catch)
   call void (...) @f(i8 addrspace(1)* %exn)
-  catchret %catch to label %exit
-catchend:
-  catchendpad unwind to caller
+  catchret from %catch to label %exit
 exit:
   ret void
 }