Fix bug: Linker/2003-08-28-TypeResolvesGlobal3.ll
authorChris Lattner <sabre@nondot.org>
Fri, 29 Aug 2003 05:37:22 +0000 (05:37 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 29 Aug 2003 05:37:22 +0000 (05:37 +0000)
Use new replaceAllUsesWith stuff in a way that works even though types have not yet been propagated

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8210 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Value.cpp

index c3bd28b514b79a19055e3c04202c5cadcc2b4ee2..245fa482b74ae2c01b99919b55b462e03c827371 100644 (file)
@@ -78,7 +78,7 @@ void Value::uncheckedReplaceAllUsesWith(Value *New) {
     // Must handle Constants specially, we cannot call replaceUsesOfWith on a
     // constant!
     if (Constant *C = dyn_cast<Constant>(Use)) {
-      C->replaceUsesOfWithOnConstant(this, New);
+      C->replaceUsesOfWithOnConstant(this, New, true);
     } else {
       Use->replaceUsesOfWith(this, New);
     }