1; RUN: %lli -extra-module=%p/Inputs/multi-module-eh-b.ll %s 2; XFAIL: arm, cygwin, win32, mingw 3declare i8* @__cxa_allocate_exception(i64) 4declare void @__cxa_throw(i8*, i8*, i8*) 5declare i32 @__gxx_personality_v0(...) 6declare void @__cxa_end_catch() 7declare i8* @__cxa_begin_catch(i8*) 8 9@_ZTIi = external constant i8* 10 11declare i32 @FB() 12 13define 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 19define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { 20entry: 21 invoke void @throwException() 22 to label %try.cont unwind label %lpad 23 24lpad: 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 32try.cont: 33 %r = call i32 @FB( ) 34 ret i32 %r 35} 36