mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
[WinEH] Minor bug fixes.
Fixed insert point for allocas created for demoted values. Clear the nested landing pad list after it has been processed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234433 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user