1 ; RUN: llc -mtriple=x86_64-windows-msvc < %s | FileCheck %s --check-prefix=X64
2 ; RUN: sed -e 's/__C_specific_handler/_except_handler3/' %s | \
3 ; RUN: llc -mtriple=i686-windows-msvc | FileCheck %s --check-prefix=X86
5 @str_recovered = internal unnamed_addr constant [10 x i8] c"recovered\00", align 1
9 define i32 @main() personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) {
12 to label %invoke.cont unwind label %lpad
14 invoke.cont: ; preds = %entry
15 %call = call i32 @puts(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str_recovered, i64 0, i64 0))
19 lpad: ; preds = %entry
20 %p = cleanuppad within none []
21 %call2 = call i32 @puts(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str_recovered, i64 0, i64 0)) [ "funclet"(token %p) ]
22 cleanupret from %p unwind to caller
28 ; X64: .seh_handlerdata
29 ; X64-NEXT: .set .Lmain$parent_frame_offset, 32
30 ; X64-NEXT: .long (.Llsda_end0-.Llsda_begin0)/16 # Number of call sites
31 ; X64-NEXT: .Llsda_begin0:
32 ; X64-NEXT: .long .Ltmp0@IMGREL+1 # LabelStart
33 ; X64-NEXT: .long .Ltmp1@IMGREL+1 # LabelEnd
34 ; X64-NEXT: .long "?dtor$2@?0?main@4HA"@IMGREL # FinallyFunclet
35 ; X64-NEXT: .long 0 # Null
36 ; X64-NEXT: .Llsda_end0:
38 ; X64-LABEL: "?dtor$2@?0?main@4HA":
45 ; X86-LABEL: "?dtor$2@?0?main@4HA":
50 ; X86: .section .xdata,"dr"
51 ; X86: L__ehtable$main:
52 ; X86-NEXT: .long -1 # ToState
53 ; X86-NEXT: .long 0 # Null
54 ; X86-NEXT: .long "?dtor$2@?0?main@4HA" # FinallyFunclet
56 declare i32 @__C_specific_handler(...)
58 declare i32 @puts(i8*)