1 ; REQUIRES: cxx-shared-library
2 ; RUN: %lli -jit-kind=mcjit -remote-mcjit -mcjit-remote-process=lli-child-target%exeext %s
3 ; XFAIL: target=arm{{.*}}, target={{.*-(cygwin|windows-msvc|windows-gnu)}}
4 ; REQUIRES: thread_support
5 ; UNSUPPORTED: target=powerpc64-unknown-linux-gnu
6 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
7 ; FIXME: Something hangs here.
8 ; UNSUPPORTED: use_msan_with_origins
9 declare ptr @__cxa_allocate_exception(i64)
10 declare void @__cxa_throw(ptr, ptr, ptr)
11 declare i32 @__gxx_personality_v0(...)
12 declare void @__cxa_end_catch()
13 declare ptr @__cxa_begin_catch(ptr)
15 @_ZTIi = external constant ptr
17 define void @throwException() {
18 %exception = tail call ptr @__cxa_allocate_exception(i64 4)
19 call void @__cxa_throw(ptr %exception, ptr @_ZTIi, ptr null)
23 define i32 @main() personality ptr @__gxx_personality_v0 {
25 invoke void @throwException()
26 to label %try.cont unwind label %lpad
29 %p = landingpad { ptr, i32 }
31 %e = extractvalue { ptr, i32 } %p, 0
32 call ptr @__cxa_begin_catch(ptr %e)
33 call void @__cxa_end_catch()