1 ; ARM EHABI test for the handlerdata.
3 ; This test case checks whether the handlerdata for exception
4 ; handling is generated properly.
6 ; (1) The handlerdata must not be empty.
7 ; (2) LPStartEncoding == DW_EH_PE_omit
8 ; (3) TTypeEncoding == DW_EH_PE_absptr
9 ; (4) CallSiteEncoding == DW_EH_PE_udata4
11 ; RUN: llc -mtriple arm-unknown-linux-gnueabi -filetype=asm -o - %s \
14 ; RUN: llc -mtriple arm-unknown-linux-gnueabi -filetype=asm -o - %s \
15 ; RUN: -relocation-model=pic \
18 declare void @throw_exception()
20 declare i32 @__gxx_personality_v0(...)
22 declare i8* @__cxa_begin_catch(i8*)
24 declare void @__cxa_end_catch()
26 define void @test1() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
28 invoke void @throw_exception() to label %try.cont unwind label %lpad
31 %0 = landingpad { i8*, i32 }
33 %1 = extractvalue { i8*, i32 } %0, 0
34 %2 = tail call i8* @__cxa_begin_catch(i8* %1)
35 tail call void @__cxa_end_catch()
44 ; CHECK: .type test1,%function
47 ; CHECK: .personality __gxx_personality_v0
50 ; CHECK-LABEL: GCC_except_table0:
51 ; CHECK-LABEL: .Lexception0:
52 ; CHECK: .byte 255 @ @LPStart Encoding = omit
53 ; CHECK: .byte 0 @ @TType Encoding = absptr
54 ; CHECK: .uleb128 .Lttbase
55 ; CHECK: .byte 1 @ Call site Encoding = uleb128
56 ; CHECK: .uleb128 .Lcst_end