blob: b7a9ca96ddab4b2155a4f1d5ebd48de9273375a4 [file] [log] [blame]
Rafael Espindolafa5942b2013-05-05 20:43:10 +00001; RUN: %lli_mcjit %s
2declare i8* @__cxa_allocate_exception(i64)
3declare void @__cxa_throw(i8*, i8*, i8*)
4declare i32 @__gxx_personality_v0(...)
5
6@_ZTIi = external constant i8*
7
8define void @throwException() {
9 %exception = tail call i8* @__cxa_allocate_exception(i64 4)
10 call void @__cxa_throw(i8* %exception, i8* bitcast (i8** @_ZTIi to i8*), i8* null)
11 unreachable
12}
13
14define i32 @main() {
15entry:
16 invoke void @throwException()
17 to label %try.cont unwind label %lpad
18
19lpad:
20 %p = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
21 catch i8* bitcast (i8** @_ZTIi to i8*)
22 br label %try.cont
23
24try.cont:
25 ret i32 0
26}