2009-09-11 18:41:06 +00:00
|
|
|
; RUN: llc < %s -mtriple=arm-apple-darwin9 -march=arm | FileCheck %s
|
2009-09-01 01:57:56 +00:00
|
|
|
|
2011-06-18 06:05:24 +00:00
|
|
|
; CHECK: L_LSDA_0:
|
|
|
|
|
|
|
|
|
2009-09-01 01:57:56 +00:00
|
|
|
%struct.A = type { i32* }
|
|
|
|
|
2010-06-17 15:18:27 +00:00
|
|
|
define void @"\01-[MyFunction Name:]"() {
|
2009-09-01 01:57:56 +00:00
|
|
|
entry:
|
2011-06-18 06:05:24 +00:00
|
|
|
%save_filt.1 = alloca i32
|
|
|
|
%save_eptr.0 = alloca i8*
|
|
|
|
%a = alloca %struct.A
|
|
|
|
%eh_exception = alloca i8*
|
|
|
|
%eh_selector = alloca i32
|
|
|
|
%"alloca point" = bitcast i32 0 to i32
|
|
|
|
call void @_ZN1AC1Ev(%struct.A* %a)
|
|
|
|
invoke void @_Z3barv()
|
2009-09-01 01:57:56 +00:00
|
|
|
to label %invcont unwind label %lpad
|
|
|
|
|
|
|
|
invcont: ; preds = %entry
|
2011-06-18 06:05:24 +00:00
|
|
|
call void @_ZN1AD1Ev(%struct.A* %a) nounwind
|
2009-09-01 01:57:56 +00:00
|
|
|
br label %return
|
|
|
|
|
|
|
|
bb: ; preds = %ppad
|
2011-06-18 06:05:24 +00:00
|
|
|
%eh_select = load i32* %eh_selector
|
2009-09-01 01:57:56 +00:00
|
|
|
store i32 %eh_select, i32* %save_filt.1, align 4
|
2011-06-18 06:05:24 +00:00
|
|
|
%eh_value = load i8** %eh_exception
|
2009-09-01 01:57:56 +00:00
|
|
|
store i8* %eh_value, i8** %save_eptr.0, align 4
|
2011-06-18 06:05:24 +00:00
|
|
|
call void @_ZN1AD1Ev(%struct.A* %a) nounwind
|
|
|
|
%0 = load i8** %save_eptr.0, align 4
|
2009-09-01 01:57:56 +00:00
|
|
|
store i8* %0, i8** %eh_exception, align 4
|
2011-06-18 06:05:24 +00:00
|
|
|
%1 = load i32* %save_filt.1, align 4
|
2009-09-01 01:57:56 +00:00
|
|
|
store i32 %1, i32* %eh_selector, align 4
|
|
|
|
br label %Unwind
|
|
|
|
|
|
|
|
return: ; preds = %invcont
|
|
|
|
ret void
|
|
|
|
|
|
|
|
lpad: ; preds = %entry
|
2011-06-18 06:05:24 +00:00
|
|
|
%eh_ptr = call i8* @llvm.eh.exception()
|
2009-09-01 01:57:56 +00:00
|
|
|
store i8* %eh_ptr, i8** %eh_exception
|
2011-06-18 06:05:24 +00:00
|
|
|
%eh_ptr1 = load i8** %eh_exception
|
|
|
|
%eh_select2 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr1, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i32 0)
|
2009-09-01 01:57:56 +00:00
|
|
|
store i32 %eh_select2, i32* %eh_selector
|
|
|
|
br label %ppad
|
|
|
|
|
|
|
|
ppad: ; preds = %lpad
|
|
|
|
br label %bb
|
|
|
|
|
|
|
|
Unwind: ; preds = %bb
|
2011-06-18 06:05:24 +00:00
|
|
|
%eh_ptr3 = load i8** %eh_exception
|
|
|
|
call void @_Unwind_SjLj_Resume(i8* %eh_ptr3)
|
2009-09-01 01:57:56 +00:00
|
|
|
unreachable
|
|
|
|
}
|
|
|
|
|
2010-06-17 15:18:27 +00:00
|
|
|
define linkonce_odr void @_ZN1AC1Ev(%struct.A* %this) {
|
2009-09-01 01:57:56 +00:00
|
|
|
entry:
|
2011-06-18 06:05:24 +00:00
|
|
|
%this_addr = alloca %struct.A*
|
|
|
|
%"alloca point" = bitcast i32 0 to i32
|
2009-09-01 01:57:56 +00:00
|
|
|
store %struct.A* %this, %struct.A** %this_addr
|
2011-06-18 06:05:24 +00:00
|
|
|
%0 = call i8* @_Znwm(i32 4)
|
|
|
|
%1 = bitcast i8* %0 to i32*
|
|
|
|
%2 = load %struct.A** %this_addr, align 4
|
|
|
|
%3 = getelementptr inbounds %struct.A* %2, i32 0, i32 0
|
2009-09-01 01:57:56 +00:00
|
|
|
store i32* %1, i32** %3, align 4
|
|
|
|
br label %return
|
|
|
|
|
|
|
|
return: ; preds = %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2010-06-17 15:18:27 +00:00
|
|
|
declare i8* @_Znwm(i32)
|
2009-09-01 01:57:56 +00:00
|
|
|
|
2010-06-17 15:18:27 +00:00
|
|
|
define linkonce_odr void @_ZN1AD1Ev(%struct.A* %this) nounwind {
|
2009-09-01 01:57:56 +00:00
|
|
|
entry:
|
2011-06-18 06:05:24 +00:00
|
|
|
%this_addr = alloca %struct.A*
|
|
|
|
%"alloca point" = bitcast i32 0 to i32
|
2009-09-01 01:57:56 +00:00
|
|
|
store %struct.A* %this, %struct.A** %this_addr
|
2011-06-18 06:05:24 +00:00
|
|
|
%0 = load %struct.A** %this_addr, align 4
|
|
|
|
%1 = getelementptr inbounds %struct.A* %0, i32 0, i32 0
|
|
|
|
%2 = load i32** %1, align 4
|
|
|
|
%3 = bitcast i32* %2 to i8*
|
|
|
|
call void @_ZdlPv(i8* %3) nounwind
|
2009-09-01 01:57:56 +00:00
|
|
|
br label %bb
|
|
|
|
|
|
|
|
bb: ; preds = %entry
|
|
|
|
br label %return
|
|
|
|
|
|
|
|
return: ; preds = %bb
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2010-06-17 15:18:27 +00:00
|
|
|
declare void @_ZdlPv(i8*) nounwind
|
2009-09-01 01:57:56 +00:00
|
|
|
|
2010-06-17 15:18:27 +00:00
|
|
|
declare void @_Z3barv()
|
2009-09-01 01:57:56 +00:00
|
|
|
|
2011-06-18 06:05:24 +00:00
|
|
|
declare i8* @llvm.eh.exception() nounwind readonly
|
2009-09-01 01:57:56 +00:00
|
|
|
|
2011-06-18 06:05:24 +00:00
|
|
|
declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind
|
2009-09-01 01:57:56 +00:00
|
|
|
|
2011-06-18 06:05:24 +00:00
|
|
|
declare i32 @llvm.eh.typeid.for(i8*) nounwind
|
2009-09-01 01:57:56 +00:00
|
|
|
|
2010-06-17 15:18:27 +00:00
|
|
|
declare i32 @__gxx_personality_sj0(...)
|
2009-09-01 01:57:56 +00:00
|
|
|
|
2010-06-17 15:18:27 +00:00
|
|
|
declare void @_Unwind_SjLj_Resume(i8*)
|