[WinEH] Fix problem with landing pad return values used in PHI nodes during outlining.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235358 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Kaylor 2015-04-20 22:53:42 +00:00
parent d3c29ac587
commit e0b5195703

View File

@ -904,6 +904,10 @@ bool WinEHPrepare::outlineHandler(ActionHandler *Action, Function *SrcFn,
++II;
}
// The landing pad value may be used by PHI nodes. It will ultimately be
// eliminated, but we need it in the map for intermediate handling.
VMap[LPad] = UndefValue::get(LPad->getType());
// Skip over PHIs and, if applicable, landingpad instructions.
II = StartBB->getFirstInsertionPt();