mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-28 06:58:19 +00:00
Fix bug: Transforms/PruneEH/2003-11-21-PHIUpdate.llx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10163 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
be8d29909e
commit
3788c242be
@ -91,12 +91,14 @@ bool PruneEH::runOnSCC(const std::vector<CallGraphNode *> &SCC) {
|
|||||||
// Anything that used the value produced by the invoke instruction
|
// Anything that used the value produced by the invoke instruction
|
||||||
// now uses the value produced by the call instruction.
|
// now uses the value produced by the call instruction.
|
||||||
II->replaceAllUsesWith(Call);
|
II->replaceAllUsesWith(Call);
|
||||||
|
II->getExceptionalDest()->removePredecessor(II->getParent());
|
||||||
|
|
||||||
// Insert a branch to the normal destination right before the
|
// Insert a branch to the normal destination right before the
|
||||||
// invoke.
|
// invoke.
|
||||||
new BranchInst(II->getNormalDest(), II);
|
new BranchInst(II->getNormalDest(), II);
|
||||||
|
|
||||||
// Finally, delete the invoke instruction!
|
// Finally, delete the invoke instruction!
|
||||||
|
|
||||||
I->getInstList().pop_back();
|
I->getInstList().pop_back();
|
||||||
|
|
||||||
++NumRemoved;
|
++NumRemoved;
|
||||||
|
Loading…
Reference in New Issue
Block a user