• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -mtriple=arm-apple-darwin9 -march=arm | FileCheck %s
2
3; CHECK: L_LSDA_0:
4
5
6%struct.A = type { i32* }
7
8define void @"\01-[MyFunction Name:]"() {
9entry:
10  %save_filt.1 = alloca i32
11  %save_eptr.0 = alloca i8*
12  %a = alloca %struct.A
13  %eh_exception = alloca i8*
14  %eh_selector = alloca i32
15  %"alloca point" = bitcast i32 0 to i32
16  call void @_ZN1AC1Ev(%struct.A* %a)
17  invoke void @_Z3barv()
18          to label %invcont unwind label %lpad
19
20invcont:                                          ; preds = %entry
21  call void @_ZN1AD1Ev(%struct.A* %a) nounwind
22  br label %return
23
24bb:                                               ; preds = %ppad
25  %eh_select = load i32* %eh_selector
26  store i32 %eh_select, i32* %save_filt.1, align 4
27  %eh_value = load i8** %eh_exception
28  store i8* %eh_value, i8** %save_eptr.0, align 4
29  call void @_ZN1AD1Ev(%struct.A* %a) nounwind
30  %0 = load i8** %save_eptr.0, align 4
31  store i8* %0, i8** %eh_exception, align 4
32  %1 = load i32* %save_filt.1, align 4
33  store i32 %1, i32* %eh_selector, align 4
34  br label %Unwind
35
36return:                                           ; preds = %invcont
37  ret void
38
39lpad:                                             ; preds = %entry
40  %eh_ptr = call i8* @llvm.eh.exception()
41  store i8* %eh_ptr, i8** %eh_exception
42  %eh_ptr1 = load i8** %eh_exception
43  %eh_select2 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr1, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i32 0)
44  store i32 %eh_select2, i32* %eh_selector
45  br label %ppad
46
47ppad:                                             ; preds = %lpad
48  br label %bb
49
50Unwind:                                           ; preds = %bb
51  %eh_ptr3 = load i8** %eh_exception
52  call void @_Unwind_SjLj_Resume(i8* %eh_ptr3)
53  unreachable
54}
55
56define linkonce_odr void @_ZN1AC1Ev(%struct.A* %this) {
57entry:
58  %this_addr = alloca %struct.A*
59  %"alloca point" = bitcast i32 0 to i32
60  store %struct.A* %this, %struct.A** %this_addr
61  %0 = call i8* @_Znwm(i32 4)
62  %1 = bitcast i8* %0 to i32*
63  %2 = load %struct.A** %this_addr, align 4
64  %3 = getelementptr inbounds %struct.A* %2, i32 0, i32 0
65  store i32* %1, i32** %3, align 4
66  br label %return
67
68return:                                           ; preds = %entry
69  ret void
70}
71
72declare i8* @_Znwm(i32)
73
74define linkonce_odr void @_ZN1AD1Ev(%struct.A* %this) nounwind {
75entry:
76  %this_addr = alloca %struct.A*
77  %"alloca point" = bitcast i32 0 to i32
78  store %struct.A* %this, %struct.A** %this_addr
79  %0 = load %struct.A** %this_addr, align 4
80  %1 = getelementptr inbounds %struct.A* %0, i32 0, i32 0
81  %2 = load i32** %1, align 4
82  %3 = bitcast i32* %2 to i8*
83  call void @_ZdlPv(i8* %3) nounwind
84  br label %bb
85
86bb:                                               ; preds = %entry
87  br label %return
88
89return:                                           ; preds = %bb
90  ret void
91}
92
93declare void @_ZdlPv(i8*) nounwind
94
95declare void @_Z3barv()
96
97declare i8* @llvm.eh.exception() nounwind readonly
98
99declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind
100
101declare i32 @llvm.eh.typeid.for(i8*) nounwind
102
103declare i32 @__gxx_personality_sj0(...)
104
105declare void @_Unwind_SjLj_Resume(i8*)
106