1 ; RUN: llc < %s -mtriple=i386-pc-mingw32 2 3 define void @func() nounwind { 4 invoke.cont: 5 %call = tail call i8* @malloc() 6 %a = invoke i32 @bar() 7 to label %bb1 unwind label %lpad 8 9 bb1: 10 ret void 11 12 lpad: 13 %exn = tail call i8* @llvm.eh.exception() nounwind 14 %eh.selector = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %exn, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1, i8* null) nounwind 15 %ehspec.fails = icmp slt i32 %eh.selector, 0 16 br i1 %ehspec.fails, label %ehspec.unexpected, label %cleanup 17 18 cleanup: 19 tail call void @_Unwind_Resume_or_Rethrow(i8* %exn) noreturn nounwind 20 unreachable 21 22 ehspec.unexpected: 23 tail call void @__cxa_call_unexpected(i8* %exn) noreturn nounwind 24 unreachable 25 } 26 27 declare noalias i8* @malloc() 28 29 declare i8* @llvm.eh.exception() nounwind readonly 30 31 declare i32 @__gxx_personality_v0(...) 32 33 declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind 34 35 declare void @_Unwind_Resume_or_Rethrow(i8*) 36 37 declare void @__cxa_call_unexpected(i8*) 38 39 declare i32 @bar() 40