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 { i32* }
12 define void @"\01-[MyFunction Name:]"() personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) {
14 %save_filt.1 = alloca i32
15 %save_eptr.0 = alloca i8*
17 %eh_exception = alloca i8*
18 %eh_selector = alloca i32
19 %"alloca point" = bitcast i32 0 to i32
20 call void @_ZN1AC1Ev(%struct.A* %a)
21 invoke void @_Z3barv()
22 to label %invcont unwind label %lpad
24 invcont: ; preds = %entry
25 call void @_ZN1AD1Ev(%struct.A* %a) nounwind
29 %eh_select = load i32, i32* %eh_selector
30 store i32 %eh_select, i32* %save_filt.1, align 4
31 %eh_value = load i8*, i8** %eh_exception
32 store i8* %eh_value, i8** %save_eptr.0, align 4
33 call void @_ZN1AD1Ev(%struct.A* %a) nounwind
34 %0 = load i8*, i8** %save_eptr.0, align 4
35 store i8* %0, i8** %eh_exception, align 4
36 %1 = load i32, i32* %save_filt.1, align 4
37 store i32 %1, i32* %eh_selector, align 4
40 return: ; preds = %invcont
43 lpad: ; preds = %entry
44 %exn = landingpad {i8*, i32}
46 %eh_ptr = extractvalue {i8*, i32} %exn, 0
47 store i8* %eh_ptr, i8** %eh_exception
48 %eh_select2 = extractvalue {i8*, i32} %exn, 1
49 store i32 %eh_select2, i32* %eh_selector
56 %eh_ptr3 = load i8*, i8** %eh_exception
57 call void @_Unwind_SjLj_Resume(i8* %eh_ptr3)
61 define linkonce_odr void @_ZN1AC1Ev(%struct.A* %this) {
63 %this_addr = alloca %struct.A*
64 %"alloca point" = bitcast i32 0 to i32
65 store %struct.A* %this, %struct.A** %this_addr
66 %0 = call i8* @_Znwm(i32 4)
67 %1 = bitcast i8* %0 to i32*
68 %2 = load %struct.A*, %struct.A** %this_addr, align 4
69 %3 = getelementptr inbounds %struct.A, %struct.A* %2, i32 0, i32 0
70 store i32* %1, i32** %3, align 4
73 return: ; preds = %entry
77 declare i8* @_Znwm(i32)
79 define linkonce_odr void @_ZN1AD1Ev(%struct.A* %this) nounwind {
81 %this_addr = alloca %struct.A*
82 %"alloca point" = bitcast i32 0 to i32
83 store %struct.A* %this, %struct.A** %this_addr
84 %0 = load %struct.A*, %struct.A** %this_addr, align 4
85 %1 = getelementptr inbounds %struct.A, %struct.A* %0, i32 0, i32 0
86 %2 = load i32*, i32** %1, align 4
87 %3 = bitcast i32* %2 to i8*
88 call void @_ZdlPv(i8* %3) nounwind
98 declare void @_ZdlPv(i8*) nounwind
100 declare void @_Z3barv()
102 declare i32 @llvm.eh.typeid.for(i8*) nounwind
104 declare i32 @__gxx_personality_sj0(...)
106 declare void @_Unwind_SjLj_Resume(i8*)