diff options
-rw-r--r-- | lib/Transforms/IPO/PruneEH.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp index 74e0d33d41..1ef2809e9d 100644 --- a/lib/Transforms/IPO/PruneEH.cpp +++ b/lib/Transforms/IPO/PruneEH.cpp @@ -91,12 +91,14 @@ bool PruneEH::runOnSCC(const std::vector<CallGraphNode *> &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; |