1 ; RUN: llc < %s -mtriple=aarch64-pc-mingw32 | FileCheck %s -check-prefix=WINEH
2 ; RUN: llc < %s -mtriple=aarch64-pc-mingw32 -filetype=obj | llvm-readobj -S - | FileCheck %s -check-prefix=WINEH-SECTIONS
4 ; Check emission of eh handler and handler data
5 declare i32 @_d_eh_personality(i32, i32, i64, ptr, ptr)
6 declare void @_d_eh_resume_unwind(ptr)
10 define i32 @foo4() #0 personality ptr @_d_eh_personality {
12 %step = alloca i32, align 4
13 store i32 0, ptr %step
14 %tmp = load i32, ptr %step
16 %tmp1 = invoke i32 @bar()
17 to label %finally unwind label %landingpad
20 store i32 1, ptr %step
21 br label %endtryfinally
24 %landing_pad = landingpad { ptr, i32 }
26 %tmp3 = extractvalue { ptr, i32 } %landing_pad, 0
27 store i32 2, ptr %step
28 call void @_d_eh_resume_unwind(ptr %tmp3)
32 %tmp10 = load i32, ptr %step
36 ; WINEH: .seh_proc foo4
37 ; WINEH: .seh_handler _d_eh_personality, @unwind, @except
39 ; WINEH: .seh_handlerdata
41 ; WINEH-NEXT: .seh_endproc
42 ; WINEH: .section .xdata,"dr"
43 ; WINEH-NEXT: .p2align 2
44 ; WINEH-NEXT: GCC_except_table0:
46 ; WINEH-SECTIONS: Name: .xdata
47 ; WINEH-SECTIONS-NOT: Name: .gcc_except_table