From 3788c242be54c0f33adf2b17b4c83e069fe58a44 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 22 Nov 2003 02:20:36 +0000 Subject: [PATCH] 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 --- lib/Transforms/IPO/PruneEH.cpp | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.34.1