summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
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
commitd0bcfe4d9decdef9a90c15d6958b165913186e15 (patch)
tree93a46d2cd321dde0f5e9836fcff7612ac84b186e /llvm/lib/Transforms
parent6f510f8eb53b7166ee336199b341d7070942943b (diff)
downloadbcm5719-llvm-d0bcfe4d9decdef9a90c15d6958b165913186e15.tar.gz
bcm5719-llvm-d0bcfe4d9decdef9a90c15d6958b165913186e15.zip
fix the regression I introduced in r159385 (it's necessary to update PHI nodes in unwind BB
llvm-svn: 159534
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp b/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
index bdcf9887b7c..91158b429ea 100644
--- a/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
+++ b/llvm/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();
}
OpenPOWER on IntegriCloud