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 %0 = landingpad { i8*, i32 }
22 %1 = extractvalue { i8*, i32 } %0, 0
23 %2 = extractvalue { i8*, i32 } %0, 1
24 %call2 = invoke i32 @puts(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str_recovered, i64 0, i64 0))
25 to label %invoke.cont1 unwind label %terminate.lpad
27 invoke.cont1: ; preds = %lpad
28 resume { i8*, i32 } %0
30 terminate.lpad: ; preds = %lpad
31 %3 = landingpad { i8*, i32 }
40 ; X64: .seh_handlerdata
42 ; X64-NEXT: .long .Ltmp0@IMGREL
43 ; X64-NEXT: .long .Ltmp1@IMGREL
44 ; X64-NEXT: .long main.cleanup@IMGREL
47 ; X64-LABEL: main.cleanup:
54 ; X86: .section .xdata,"dr"
55 ; X86: L__ehtable$main:
58 ; X86-NEXT: .long _main.cleanup
60 ; X86-LABEL: _main.cleanup:
64 declare i32 @__C_specific_handler(...)
66 declare i32 @puts(i8*)