llvm.org GIT mirror llvm / a1df0a3
[WinEH] Don't skip landing pads that end with an unreachable instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235563 91177308-0d34-0410-b5e6-96231b3b80d8 Andrew Kaylor 5 years ago
3 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
636636 LPadHasActionList = true;
637637 break;
638638 }
639 // FIXME: This is here to help with the development of nested landing pad
640 // outlining. It should be removed when that is finished.
641 if (isa(Inst)) {
642 LPadHasActionList = true;
643 break;
644 }
645639 }
646640
647641 // If we've already outlined the handlers for this landingpad,
10101004 llvm::StructType::get(Type::getInt8PtrTy(Context),
10111005 Type::getInt32Ty(Context), nullptr),
10121006 PersonalityFn, 0);
1007 // Insert a call to llvm.eh.actions so that we don't try to outline this lpad.
1008 Function *ActionIntrin = Intrinsic::getDeclaration(Handler->getParent(),
1009 Intrinsic::eh_actions);
1010 Builder.CreateCall(ActionIntrin, "recover");
10131011 LPad->setCleanup(true);
10141012 Builder.CreateUnreachable();
10151013 return StubBB;
105105 stub: ; preds = %entry
106106 %4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
107107 cleanup
108 %recover = call i8* (...) @llvm.eh.actions()
108109 unreachable
109110 }
110111
6969 lpad: ; preds = %entry
7070 %4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
7171 cleanup
72 %recover = call i8* (...) @llvm.eh.actions()
7273 unreachable
7374 }
7475