1 ; RUN: opt < %s -inline -S | FileCheck %s
2 target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
3 target triple = "x86_64-pc-windows-msvc18.0.0"
5 define void @f() personality i32 (...)* @__CxxFrameHandler3 {
8 to label %try.cont unwind label %catch.dispatch
10 catch.dispatch: ; preds = %entry
11 %cs1 = catchswitch within none [label %catch] unwind to caller
13 catch: ; preds = %catch.dispatch
14 %0 = catchpad within %cs1 [i8* null, i32 64, i8* null]
16 to label %invoke.cont.1 unwind label %ehcleanup
18 invoke.cont.1: ; preds = %catch
19 catchret from %0 to label %try.cont
21 try.cont: ; preds = %entry, %invoke.cont.1
25 %cp2 = cleanuppad within none []
27 cleanupret from %cp2 unwind to caller
30 ; CHECK-LABEL: define void @f(
32 ; CHECK: invoke void @g()
33 ; CHECK: to label %dtor.exit unwind label %terminate.i
36 ; CHECK-NEXT: terminatepad within %0 [void ()* @terminate] unwind label %ehcleanup
38 declare i32 @__CxxFrameHandler3(...)
40 define internal void @dtor() personality i32 (...)* @__CxxFrameHandler3 {
43 to label %invoke.cont unwind label %terminate
45 invoke.cont: ; preds = %entry
48 terminate: ; preds = %entry
49 terminatepad within none [void ()* @terminate] unwind to caller
53 declare void @terminate()