diff options
| author | Reid Kleckner <rnk@google.com> | 2015-09-16 20:16:27 +0000 |
|---|---|---|
| committer | Reid Kleckner <rnk@google.com> | 2015-09-16 20:16:27 +0000 |
| commit | b005d281c36c09eda1b85db59e2c183ed5defca5 (patch) | |
| tree | 8263838e6c8079eceaccb60c61aa8c393205aa95 /llvm/lib/CodeGen/PrologEpilogInserter.cpp | |
| parent | 10aa77032de43681231e81ee3f2e7d232b16dc9c (diff) | |
| download | llvm-b005d281c36c09eda1b85db59e2c183ed5defca5.zip llvm-b005d281c36c09eda1b85db59e2c183ed5defca5.tar.gz llvm-b005d281c36c09eda1b85db59e2c183ed5defca5.tar.bz2 | |
[WinEH] Pull Adjectives and CatchObj out of the catchpad arg list
Clang now passes the adjectives as an argument to catchpad.
Getting the CatchObj working is simply a matter of threading another
static alloca through codegen, first as an alloca, then as a frame
index, and finally as a frame offset.
llvm-svn: 247844
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); |
