xref: /aosp_15_r20/external/llvm/test/CodeGen/ARM/2009-08-31-LSDA-Name.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=arm-apple-darwin9 -march=arm | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; CHECK: .cfi_lsda 16, [[LABEL:.*]]
4*9880d681SAndroid Build Coastguard Worker; CHECK: .long  [[LABEL]]-
5*9880d681SAndroid Build Coastguard Worker; CHECK: [[LABEL]]:
6*9880d681SAndroid Build Coastguard Worker; CHECK: .byte   255                     @ @LPStart Encoding = omit
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Worker%struct.A = type { i32* }
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Workerdefine void @"\01-[MyFunction Name:]"() personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) {
11*9880d681SAndroid Build Coastguard Workerentry:
12*9880d681SAndroid Build Coastguard Worker  %save_filt.1 = alloca i32
13*9880d681SAndroid Build Coastguard Worker  %save_eptr.0 = alloca i8*
14*9880d681SAndroid Build Coastguard Worker  %a = alloca %struct.A
15*9880d681SAndroid Build Coastguard Worker  %eh_exception = alloca i8*
16*9880d681SAndroid Build Coastguard Worker  %eh_selector = alloca i32
17*9880d681SAndroid Build Coastguard Worker  %"alloca point" = bitcast i32 0 to i32
18*9880d681SAndroid Build Coastguard Worker  call void @_ZN1AC1Ev(%struct.A* %a)
19*9880d681SAndroid Build Coastguard Worker  invoke void @_Z3barv()
20*9880d681SAndroid Build Coastguard Worker          to label %invcont unwind label %lpad
21*9880d681SAndroid Build Coastguard Worker
22*9880d681SAndroid Build Coastguard Workerinvcont:                                          ; preds = %entry
23*9880d681SAndroid Build Coastguard Worker  call void @_ZN1AD1Ev(%struct.A* %a) nounwind
24*9880d681SAndroid Build Coastguard Worker  br label %return
25*9880d681SAndroid Build Coastguard Worker
26*9880d681SAndroid Build Coastguard Workerbb:                                               ; preds = %ppad
27*9880d681SAndroid Build Coastguard Worker  %eh_select = load i32, i32* %eh_selector
28*9880d681SAndroid Build Coastguard Worker  store i32 %eh_select, i32* %save_filt.1, align 4
29*9880d681SAndroid Build Coastguard Worker  %eh_value = load i8*, i8** %eh_exception
30*9880d681SAndroid Build Coastguard Worker  store i8* %eh_value, i8** %save_eptr.0, align 4
31*9880d681SAndroid Build Coastguard Worker  call void @_ZN1AD1Ev(%struct.A* %a) nounwind
32*9880d681SAndroid Build Coastguard Worker  %0 = load i8*, i8** %save_eptr.0, align 4
33*9880d681SAndroid Build Coastguard Worker  store i8* %0, i8** %eh_exception, align 4
34*9880d681SAndroid Build Coastguard Worker  %1 = load i32, i32* %save_filt.1, align 4
35*9880d681SAndroid Build Coastguard Worker  store i32 %1, i32* %eh_selector, align 4
36*9880d681SAndroid Build Coastguard Worker  br label %Unwind
37*9880d681SAndroid Build Coastguard Worker
38*9880d681SAndroid Build Coastguard Workerreturn:                                           ; preds = %invcont
39*9880d681SAndroid Build Coastguard Worker  ret void
40*9880d681SAndroid Build Coastguard Worker
41*9880d681SAndroid Build Coastguard Workerlpad:                                             ; preds = %entry
42*9880d681SAndroid Build Coastguard Worker  %exn = landingpad {i8*, i32}
43*9880d681SAndroid Build Coastguard Worker           cleanup
44*9880d681SAndroid Build Coastguard Worker  %eh_ptr = extractvalue {i8*, i32} %exn, 0
45*9880d681SAndroid Build Coastguard Worker  store i8* %eh_ptr, i8** %eh_exception
46*9880d681SAndroid Build Coastguard Worker  %eh_select2 = extractvalue {i8*, i32} %exn, 1
47*9880d681SAndroid Build Coastguard Worker  store i32 %eh_select2, i32* %eh_selector
48*9880d681SAndroid Build Coastguard Worker  br label %ppad
49*9880d681SAndroid Build Coastguard Worker
50*9880d681SAndroid Build Coastguard Workerppad:                                             ; preds = %lpad
51*9880d681SAndroid Build Coastguard Worker  br label %bb
52*9880d681SAndroid Build Coastguard Worker
53*9880d681SAndroid Build Coastguard WorkerUnwind:                                           ; preds = %bb
54*9880d681SAndroid Build Coastguard Worker  %eh_ptr3 = load i8*, i8** %eh_exception
55*9880d681SAndroid Build Coastguard Worker  call void @_Unwind_SjLj_Resume(i8* %eh_ptr3)
56*9880d681SAndroid Build Coastguard Worker  unreachable
57*9880d681SAndroid Build Coastguard Worker}
58*9880d681SAndroid Build Coastguard Worker
59*9880d681SAndroid Build Coastguard Workerdefine linkonce_odr void @_ZN1AC1Ev(%struct.A* %this) {
60*9880d681SAndroid Build Coastguard Workerentry:
61*9880d681SAndroid Build Coastguard Worker  %this_addr = alloca %struct.A*
62*9880d681SAndroid Build Coastguard Worker  %"alloca point" = bitcast i32 0 to i32
63*9880d681SAndroid Build Coastguard Worker  store %struct.A* %this, %struct.A** %this_addr
64*9880d681SAndroid Build Coastguard Worker  %0 = call i8* @_Znwm(i32 4)
65*9880d681SAndroid Build Coastguard Worker  %1 = bitcast i8* %0 to i32*
66*9880d681SAndroid Build Coastguard Worker  %2 = load %struct.A*, %struct.A** %this_addr, align 4
67*9880d681SAndroid Build Coastguard Worker  %3 = getelementptr inbounds %struct.A, %struct.A* %2, i32 0, i32 0
68*9880d681SAndroid Build Coastguard Worker  store i32* %1, i32** %3, align 4
69*9880d681SAndroid Build Coastguard Worker  br label %return
70*9880d681SAndroid Build Coastguard Worker
71*9880d681SAndroid Build Coastguard Workerreturn:                                           ; preds = %entry
72*9880d681SAndroid Build Coastguard Worker  ret void
73*9880d681SAndroid Build Coastguard Worker}
74*9880d681SAndroid Build Coastguard Worker
75*9880d681SAndroid Build Coastguard Workerdeclare i8* @_Znwm(i32)
76*9880d681SAndroid Build Coastguard Worker
77*9880d681SAndroid Build Coastguard Workerdefine linkonce_odr void @_ZN1AD1Ev(%struct.A* %this) nounwind {
78*9880d681SAndroid Build Coastguard Workerentry:
79*9880d681SAndroid Build Coastguard Worker  %this_addr = alloca %struct.A*
80*9880d681SAndroid Build Coastguard Worker  %"alloca point" = bitcast i32 0 to i32
81*9880d681SAndroid Build Coastguard Worker  store %struct.A* %this, %struct.A** %this_addr
82*9880d681SAndroid Build Coastguard Worker  %0 = load %struct.A*, %struct.A** %this_addr, align 4
83*9880d681SAndroid Build Coastguard Worker  %1 = getelementptr inbounds %struct.A, %struct.A* %0, i32 0, i32 0
84*9880d681SAndroid Build Coastguard Worker  %2 = load i32*, i32** %1, align 4
85*9880d681SAndroid Build Coastguard Worker  %3 = bitcast i32* %2 to i8*
86*9880d681SAndroid Build Coastguard Worker  call void @_ZdlPv(i8* %3) nounwind
87*9880d681SAndroid Build Coastguard Worker  br label %bb
88*9880d681SAndroid Build Coastguard Worker
89*9880d681SAndroid Build Coastguard Workerbb:                                               ; preds = %entry
90*9880d681SAndroid Build Coastguard Worker  br label %return
91*9880d681SAndroid Build Coastguard Worker
92*9880d681SAndroid Build Coastguard Workerreturn:                                           ; preds = %bb
93*9880d681SAndroid Build Coastguard Worker  ret void
94*9880d681SAndroid Build Coastguard Worker}
95*9880d681SAndroid Build Coastguard Worker
96*9880d681SAndroid Build Coastguard Workerdeclare void @_ZdlPv(i8*) nounwind
97*9880d681SAndroid Build Coastguard Worker
98*9880d681SAndroid Build Coastguard Workerdeclare void @_Z3barv()
99*9880d681SAndroid Build Coastguard Worker
100*9880d681SAndroid Build Coastguard Workerdeclare i32 @llvm.eh.typeid.for(i8*) nounwind
101*9880d681SAndroid Build Coastguard Worker
102*9880d681SAndroid Build Coastguard Workerdeclare i32 @__gxx_personality_sj0(...)
103*9880d681SAndroid Build Coastguard Worker
104*9880d681SAndroid Build Coastguard Workerdeclare void @_Unwind_SjLj_Resume(i8*)
105