aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2012-07-02 16:14:47 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2012-07-02 16:14:47 +0000
commit4ccb89c71fdc3d33681e292f42e49d8527cb9d7f (patch)
tree32988cc59767aebf772cd70e7dee44b33a9aa321 /lib/Transforms/Scalar
parentdbd0f69e546bbf29e4bebb5618acb321365dd4f5 (diff)
downloadexternal_llvm-4ccb89c71fdc3d33681e292f42e49d8527cb9d7f.zip
external_llvm-4ccb89c71fdc3d33681e292f42e49d8527cb9d7f.tar.gz
external_llvm-4ccb89c71fdc3d33681e292f42e49d8527cb9d7f.tar.bz2
fix the regression I introduced in r159385 (it's necessary to update PHI nodes in unwind BB
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159534 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar')
-rw-r--r--lib/Transforms/Scalar/SimplifyCFGPass.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/SimplifyCFGPass.cpp b/lib/Transforms/Scalar/SimplifyCFGPass.cpp
index bdcf988..91158b4 100644
--- a/lib/Transforms/Scalar/SimplifyCFGPass.cpp
+++ b/lib/Transforms/Scalar/SimplifyCFGPass.cpp
@@ -99,6 +99,9 @@ static void ChangeToCall(InvokeInst *II) {
// Follow the call by a branch to the normal destination.
BranchInst::Create(II->getNormalDest(), II);
+
+ // Update PHI nodes in the unwind destination
+ II->getUnwindDest()->removePredecessor(II->getParent());
II->eraseFromParent();
}