1 ; RUN: sed -e s/.Cxx:// %s | llc -mtriple=x86_64-pc-windows-msvc | FileCheck %s --check-prefix=CXX
2 ; RUN: sed -e s/.Seh:// %s | llc -mtriple=x86_64-pc-windows-msvc | FileCheck %s --check-prefix=SEH
4 declare i32 @__CxxFrameHandler3(...)
5 declare i32 @__C_specific_handler(...)
6 declare void @dummy_filter()
10 ;Cxx: define void @test() personality i32 (...)* @__CxxFrameHandler3 {
11 ;Seh: define void @test() personality i32 (...)* @__C_specific_handler {
14 to label %invoke.cont unwind label %catch.dispatch
17 %cs1 = catchswitch within none [label %catch.body] unwind label %catch.dispatch.2
20 ;Cxx: %catch = catchpad within %cs1 [i8* null, i32 u0x40, i8* null]
21 ;Seh: %catch = catchpad within %cs1 [void ()* @dummy_filter]
22 invoke void @f(i32 2) [ "funclet"(token %catch) ]
23 to label %unreachable unwind label %terminate
26 %cleanup = cleanuppad within %catch []
27 call void @f(i32 3) [ "funclet"(token %cleanup) ]
37 %cs2 = catchswitch within none [label %catch.body.2] unwind to caller
40 ;Cxx: %catch2 = catchpad within %cs2 [i8* null, i32 u0x40, i8* null]
41 ;Seh: %catch2 = catchpad within %cs2 [void ()* @dummy_filter]
46 ; CXX-LABEL: $ip2state$test:
47 ; CXX-NEXT: .long .Lfunc_begin0@IMGREL
49 ; CXX-NEXT: .long .Ltmp0@IMGREL+1
51 ; CXX-NEXT: .long .Ltmp1@IMGREL+1
53 ; CXX-NEXT: .long "?catch$3@?0?test@4HA"@IMGREL
55 ; CXX-NEXT: .long .Ltmp2@IMGREL+1
57 ; CXX-NEXT: .long .Ltmp3@IMGREL+1
59 ; CXX-NEXT: .long "?catch$5@?0?test@4HA"@IMGREL
63 ; SEH-LABEL: .Llsda_begin0:
64 ; SEH-NEXT: .long .Ltmp0@IMGREL+1
65 ; SEH-NEXT: .long .Ltmp1@IMGREL+1
66 ; SEH-NEXT: .long dummy_filter@IMGREL
67 ; SEH-NEXT: .long .LBB0_3@IMGREL
68 ; SEH-NEXT: .long .Ltmp0@IMGREL+1
69 ; SEH-NEXT: .long .Ltmp1@IMGREL+1
70 ; SEH-NEXT: .long dummy_filter@IMGREL
71 ; SEH-NEXT: .long .LBB0_5@IMGREL
72 ; SEH-NEXT: .long .Ltmp2@IMGREL+1
73 ; SEH-NEXT: .long .Ltmp3@IMGREL+1
74 ; SEH-NEXT: .long "?dtor$2@?0?test@4HA"@IMGREL
76 ; SEH-NEXT: .long .Ltmp2@IMGREL+1
77 ; SEH-NEXT: .long .Ltmp3@IMGREL+1
78 ; SEH-NEXT: .long dummy_filter@IMGREL
79 ; SEH-NEXT: .long .LBB0_5@IMGREL
80 ; SEH-NEXT: .Llsda_end0: