From: Chris Lattner Date: Sat, 22 Nov 2003 02:20:36 +0000 (+0000) Subject: Fix bug: Transforms/PruneEH/2003-11-21-PHIUpdate.llx X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3788c242be54c0f33adf2b17b4c83e069fe58a44;p=oota-llvm.git 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 --- diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp index 74e0d33d412..1ef2809e9d3 100644 --- a/lib/Transforms/IPO/PruneEH.cpp +++ b/lib/Transforms/IPO/PruneEH.cpp @@ -91,12 +91,14 @@ bool PruneEH::runOnSCC(const std::vector &SCC) { // Anything that used the value produced by the invoke instruction // now uses the value produced by the call instruction. II->replaceAllUsesWith(Call); + II->getExceptionalDest()->removePredecessor(II->getParent()); // Insert a branch to the normal destination right before the // invoke. new BranchInst(II->getNormalDest(), II); // Finally, delete the invoke instruction! + I->getInstList().pop_back(); ++NumRemoved;