diff options
Diffstat (limited to 'llvm/lib/Transforms/IPO')
-rw-r--r-- | llvm/lib/Transforms/IPO/PruneEH.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/PruneEH.cpp b/llvm/lib/Transforms/IPO/PruneEH.cpp index 74e0d33d412..1ef2809e9d3 100644 --- a/llvm/lib/Transforms/IPO/PruneEH.cpp +++ b/llvm/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; |