diff options
Diffstat (limited to 'llvm/lib/CodeGen/PrologEpilogInserter.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/PrologEpilogInserter.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp index f169f48..54f5553 100644 --- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp +++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp @@ -819,6 +819,16 @@ void PEI::replaceFrameIndices(MachineFunction &Fn) { if (FuncInfo.UnwindHelpFrameIdx != INT_MAX) FuncInfo.UnwindHelpFrameOffset = TFI.getFrameIndexReferenceFromSP( Fn, FuncInfo.UnwindHelpFrameIdx, FrameReg); + for (WinEHTryBlockMapEntry &TBME : FuncInfo.TryBlockMap) { + for (WinEHHandlerType &H : TBME.HandlerArray) { + unsigned UnusedReg; + if (H.CatchObj.FrameIndex == INT_MAX) + H.CatchObj.FrameOffset = INT_MAX; + else + H.CatchObj.FrameOffset = + TFI.getFrameIndexReference(Fn, H.CatchObj.FrameIndex, UnusedReg); + } + } } else if (MMI.hasWinEHFuncInfo(F)) { WinEHFuncInfo &FuncInfo = MMI.getWinEHFuncInfo(Fn.getFunction()); auto I = FuncInfo.CatchHandlerParentFrameObjIdx.find(F); |
