commit | 4ccb89c71fdc3d33681e292f42e49d8527cb9d7f | [log] [tgz] |
---|---|---|
author | Nuno Lopes <nunoplopes@sapo.pt> | Mon Jul 02 16:14:47 2012 +0000 |
committer | Nuno Lopes <nunoplopes@sapo.pt> | Mon Jul 02 16:14:47 2012 +0000 |
tree | 32988cc59767aebf772cd70e7dee44b33a9aa321 | |
parent | dbd0f69e546bbf29e4bebb5618acb321365dd4f5 [diff] [blame] |
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
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 @@ // 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(); }