1 ; RUN: llc < %s -mtriple=arm-apple-darwin9 | FileCheck %s
3 ; CHECK: ldr r0, [[CPI_PERSONALITY:[A-Za-z0-9_]+]]
4 ; CHECK: ldr r0, [[CPI_LSDA:[A-Za-z0-9_]+]]
6 ; CHECK: .long [[LSDA_LABEL:[A-Za-z0-9_]+]]-
7 ; CHECK: [[LSDA_LABEL]]:
8 ; CHECK: .byte 255 @ @LPStart Encoding = omit
10 %struct.A = type { ptr }
12 define void @"\01-[MyFunction Name:]"() personality ptr @__gxx_personality_sj0 {
14 %save_filt.1 = alloca i32
15 %save_eptr.0 = alloca ptr
17 %eh_exception = alloca ptr
18 %eh_selector = alloca i32
19 %"alloca point" = bitcast i32 0 to i32
20 call void @_ZN1AC1Ev(ptr %a)
21 invoke void @_Z3barv()
22 to label %invcont unwind label %lpad
24 invcont: ; preds = %entry
25 call void @_ZN1AD1Ev(ptr %a) nounwind
29 %eh_select = load i32, ptr %eh_selector
30 store i32 %eh_select, ptr %save_filt.1, align 4
31 %eh_value = load ptr, ptr %eh_exception
32 store ptr %eh_value, ptr %save_eptr.0, align 4
33 call void @_ZN1AD1Ev(ptr %a) nounwind
34 %0 = load ptr, ptr %save_eptr.0, align 4
35 store ptr %0, ptr %eh_exception, align 4
36 %1 = load i32, ptr %save_filt.1, align 4
37 store i32 %1, ptr %eh_selector, align 4
40 return: ; preds = %invcont
43 lpad: ; preds = %entry
44 %exn = landingpad {ptr, i32}
46 %eh_ptr = extractvalue {ptr, i32} %exn, 0
47 store ptr %eh_ptr, ptr %eh_exception
48 %eh_select2 = extractvalue {ptr, i32} %exn, 1
49 store i32 %eh_select2, ptr %eh_selector
56 %eh_ptr3 = load ptr, ptr %eh_exception
57 call void @_Unwind_SjLj_Resume(ptr %eh_ptr3)
61 define linkonce_odr void @_ZN1AC1Ev(ptr %this) {
63 %this_addr = alloca ptr
64 %"alloca point" = bitcast i32 0 to i32
65 store ptr %this, ptr %this_addr
66 %0 = call ptr @_Znwm(i32 4)
67 %1 = load ptr, ptr %this_addr, align 4
68 store ptr %0, ptr %1, align 4
71 return: ; preds = %entry
75 declare ptr @_Znwm(i32)
77 define linkonce_odr void @_ZN1AD1Ev(ptr %this) nounwind {
79 %this_addr = alloca ptr
80 %"alloca point" = bitcast i32 0 to i32
81 store ptr %this, ptr %this_addr
82 %0 = load ptr, ptr %this_addr, align 4
83 %1 = load ptr, ptr %0, align 4
84 call void @_ZdlPv(ptr %1) nounwind
94 declare void @_ZdlPv(ptr) nounwind
96 declare void @_Z3barv()
98 declare i32 @llvm.eh.typeid.for(ptr) nounwind
100 declare i32 @__gxx_personality_sj0(...)
102 declare void @_Unwind_SjLj_Resume(ptr)