1 ; RUN: %lli -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s 2 ; XFAIL: arm, cygwin, win32, mingw 3 ; UNSUPPORTED: powerpc64-unknown-linux-gnu 4 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed 5 declare i8* @__cxa_allocate_exception(i64) 6 declare void @__cxa_throw(i8*, i8*, i8*) 7 declare i32 @__gxx_personality_v0(...) 8 declare void @__cxa_end_catch() 9 declare i8* @__cxa_begin_catch(i8*) 10 11 @_ZTIi = external constant i8* 12 13 define void @throwException() { 14 %exception = tail call i8* @__cxa_allocate_exception(i64 4) 15 call void @__cxa_throw(i8* %exception, i8* bitcast (i8** @_ZTIi to i8*), i8* null) 16 unreachable 17 } 18 19 define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { 20 entry: 21 invoke void @throwException() 22 to label %try.cont unwind label %lpad 23 24 lpad: 25 %p = landingpad { i8*, i32 } 26 catch i8* bitcast (i8** @_ZTIi to i8*) 27 %e = extractvalue { i8*, i32 } %p, 0 28 call i8* @__cxa_begin_catch(i8* %e) 29 call void @__cxa_end_catch() 30 br label %try.cont 31 32 try.cont: 33 ret i32 0 34 } 35