From 61ea0e469254e0c7ab0e190b463d994b9316846c Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Thu, 23 Jun 2011 09:09:15 +0000 Subject: Reinstate r133513 (reverted in r133700) with an additional fix for a -Wshorten-64-to-32 warning in Instructions.h. llvm-svn: 133708 --- llvm/lib/VMCore/Value.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib/VMCore/Value.cpp') 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(this)) + BB->replaceSuccessorsPhiUsesWith(cast(New)); } void Value::replaceAllUsesWith(Value *New) { -- cgit v1.2.3