From d49981a9bbeb49626389119ebec3b0626337b233 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Mon, 16 Jul 2012 22:49:40 +0000 Subject: fix PR13339 (remove the predecessor from the unwind BB when removing an invoke) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160325 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/SimplifyCFGPass.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/Transforms/Scalar/SimplifyCFGPass.cpp') diff --git a/lib/Transforms/Scalar/SimplifyCFGPass.cpp b/lib/Transforms/Scalar/SimplifyCFGPass.cpp index 91158b429e..99e236f543 100644 --- a/lib/Transforms/Scalar/SimplifyCFGPass.cpp +++ b/lib/Transforms/Scalar/SimplifyCFGPass.cpp @@ -165,6 +165,7 @@ static bool MarkAliveBlocks(BasicBlock *BB, if (II->use_empty() && II->onlyReadsMemory()) { // jump to the normal destination branch. BranchInst::Create(II->getNormalDest(), II); + II->getUnwindDest()->removePredecessor(II->getParent()); II->eraseFromParent(); } else ChangeToCall(II); -- cgit v1.2.3