From f40cdbe856e8a15b3186de29c7f0bcedb3a8ca86 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 22 Nov 2003 02:20:36 +0000 Subject: Fix bug: Transforms/PruneEH/2003-11-21-PHIUpdate.llx llvm-svn: 10163 --- llvm/lib/Transforms/IPO/PruneEH.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/Transforms/IPO/PruneEH.cpp') 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 &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; -- cgit v1.2.3