diff options
author | Andrew Kaylor <andrew.kaylor@intel.com> | 2015-04-08 20:57:22 +0000 |
---|---|---|
committer | Andrew Kaylor <andrew.kaylor@intel.com> | 2015-04-08 20:57:22 +0000 |
commit | 67d3c0359d9bc0b43406f831a66b7c638e82ae28 (patch) | |
tree | ed4c65c6df30255e46844141328e00bbe737bd0d /llvm/lib/CodeGen/WinEHPrepare.cpp | |
parent | d3165af7566de4a48e4639ff17cd8ce35db2e1f7 (diff) | |
download | bcm5719-llvm-67d3c0359d9bc0b43406f831a66b7c638e82ae28.tar.gz bcm5719-llvm-67d3c0359d9bc0b43406f831a66b7c638e82ae28.zip |
[WinEH] Minor bug fixes.
Fixed insert point for allocas created for demoted values.
Clear the nested landing pad list after it has been processed.
llvm-svn: 234433
Diffstat (limited to 'llvm/lib/CodeGen/WinEHPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/WinEHPrepare.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/WinEHPrepare.cpp b/llvm/lib/CodeGen/WinEHPrepare.cpp index 1133151ca77..84c10bfceca 100644 --- a/llvm/lib/CodeGen/WinEHPrepare.cpp +++ b/llvm/lib/CodeGen/WinEHPrepare.cpp @@ -499,6 +499,7 @@ bool WinEHPrepare::prepareExceptionHandlers( // cleans up references to outlined blocks that will be deleted. for (auto &LPadPair : NestedLPtoOriginalLP) completeNestedLandingPad(&F, LPadPair.first, LPadPair.second, FrameVarInfo); + NestedLPtoOriginalLP.clear(); F.addFnAttr("wineh-parent", F.getName()); @@ -554,10 +555,10 @@ bool WinEHPrepare::prepareExceptionHandlers( ++InsertPt; ParentAlloca = new AllocaInst(ParentInst->getType(), nullptr, - ParentInst->getName() + ".reg2mem", InsertPt); + ParentInst->getName() + ".reg2mem", AllocaInsertPt); new StoreInst(ParentInst, ParentAlloca, InsertPt); } else { - ParentAlloca = DemoteRegToStack(*ParentInst, true, ParentInst); + ParentAlloca = DemoteRegToStack(*ParentInst, true, AllocaInsertPt); } } } |