summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Value.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/VMCore/Value.cpp')
-rw-r--r--llvm/lib/VMCore/Value.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Value.cpp b/llvm/lib/VMCore/Value.cpp
index 29f6a8094f0..a03cddc9d5e 100644
--- a/llvm/lib/VMCore/Value.cpp
+++ b/llvm/lib/VMCore/Value.cpp
@@ -305,6 +305,9 @@ void Value::uncheckedReplaceAllUsesWith(Value *New) {
U.set(New);
}
+
+ if (BasicBlock *BB = dyn_cast<BasicBlock>(this))
+ BB->replaceSuccessorsPhiUsesWith(cast<BasicBlock>(New));
}
void Value::replaceAllUsesWith(Value *New) {
OpenPOWER on IntegriCloud