[IR] Reformulate LLVM's EH funclet IR
[oota-llvm.git] / test / CodeGen / X86 / win-funclet-cfi.ll
index 52589ee1918dbb3b390f79441c55dfec7378bbd0..95afa75a709a541e973a31969b7ed3c8153b6dce 100644 (file)
@@ -9,24 +9,21 @@ entry:
           to label %unreachable unwind label %cleanupblock
 
 cleanupblock:
-  %cleanp = cleanuppad []
+  %cleanp = cleanuppad within none []
   call void @g()
-  cleanupret %cleanp unwind label %catch.dispatch
+  cleanupret from %cleanp unwind label %catch.dispatch
 
 catch.dispatch:
-  %cp = catchpad [i8* null, i32 64, i8* null]
-          to label %catch unwind label %catchendblock
+  %cs1 = catchswitch within none [label %catch] unwind to caller
 
 catch:
+  %cp = catchpad within %cs1 [i8* null, i32 64, i8* null]
   call void @g()
-  catchret %cp to label %try.cont
+  catchret from %cp to label %try.cont
 
 try.cont:
   ret void
 
-catchendblock:
-  catchendpad unwind to caller
-
 unreachable:
   unreachable
 }
@@ -70,7 +67,7 @@ declare i32 @__CxxFrameHandler3(...)
 ; CHECK: "?catch$[[catch:[0-9]+]]@?0??f@@YAXXZ@4HA":
 ; CHECK: .seh_proc "?catch$[[catch]]@?0??f@@YAXXZ@4HA"
 ; CHECK-NEXT: .seh_handler __CxxFrameHandler3, @unwind, @except
-; CHECK: LBB0_[[catch]]: # %catch.dispatch{{$}}
+; CHECK: LBB0_[[catch]]: # %catch{{$}}
 
 ; Emit CFI for pushing RBP.
 ; CHECK: movq    %rdx, 16(%rsp)