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:
Chris Lattner 2003-11-22 02:20:36 +00:00
parent be8d29909e
commit 3788c242be

View File

@ -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;