Update some tests to the new EH scheme.

llvm-svn: 138925
This commit is contained in:
Bill Wendling 2011-09-01 00:58:03 +00:00
parent 832a6a1909
commit e88632d667
5 changed files with 27 additions and 1 deletions

View File

@ -11,6 +11,8 @@ T:
%y = extractvalue {i32,i32} %x, 1
ret i32 %y
T2:
%exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
cleanup
unreachable
}
@ -22,5 +24,9 @@ T:
%y = extractvalue {i32,i32} %x, 1
ret i32 %y
T2:
%exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
cleanup
unreachable
}
declare i32 @__gxx_personality_v0(...)

View File

@ -46,9 +46,13 @@ define i1 @c6(i8* %q, i8 %bit) {
ret0:
ret i1 0
ret1:
%exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
cleanup
ret i1 1
}
declare i32 @__gxx_personality_v0(...)
define i1* @lookup_bit(i32* %q, i32 %bitno) readnone nounwind {
%tmp = ptrtoint i32* %q to i32
%tmp2 = lshr i32 %tmp, %bitno

View File

@ -45,6 +45,8 @@ k151.i.i: ; preds = %k133.i.i
ret i32 0
landing_pad: ; preds = %l147.i.i, %l129.i.i, %l117.i.i
%exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
cleanup
switch i32 undef, label %fin [
i32 1, label %catch1
i32 2, label %catch
@ -61,3 +63,5 @@ catch1: ; preds = %landing_pad
}
declare fastcc void @foo()
declare i32 @__gxx_personality_v0(...)

View File

@ -36,14 +36,22 @@ define void @caller(i1 %C) {
;; propagated per-caller).
%S1 = call { i32, i32 } @foo(i32 1, i32 2)
%X1 = extractvalue { i32, i32 } %S1, 0
%S2 = invoke { i32, i32 } @foo(i32 3, i32 4) to label %OK unwind label %RET
%S2 = invoke { i32, i32 } @foo(i32 3, i32 4) to label %OK unwind label %LPAD
OK:
%X2 = extractvalue { i32, i32 } %S2, 0
;; Do some stuff with the returned values which we can grep for
%Z = add i32 %X1, %X2
store i32 %Z, i32* %W
br label %RET
LPAD:
%exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
cleanup
br label %RET
RET:
ret void
}
declare i32 @__gxx_personality_v0(...)

View File

@ -22,5 +22,9 @@ OK:
%Y = icmp ne i32 %X, 0 ; <i1> [#uses=1]
ret i1 %Y
FAIL:
%exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
cleanup
ret i1 false
}
declare i32 @__gxx_personality_v0(...)