]> granicus.if.org Git - clang/commitdiff
Do not check use_empty() before invoking replaceAllUsesWith().
authorDevang Patel <dpatel@apple.com>
Tue, 13 Oct 2009 17:02:04 +0000 (17:02 +0000)
committerDevang Patel <dpatel@apple.com>
Tue, 13 Oct 2009 17:02:04 +0000 (17:02 +0000)
Let replaceAllUsesWith() adjust VHs even though there are no uses.

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

lib/CodeGen/CodeGenModule.cpp

index f49a3de32b295200bd3f55207c0e51794ea00014..a7a9805452dc5866f3f4ba8e31bb56de9ba58fef 100644 (file)
@@ -1110,8 +1110,9 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old,
     NewCall->setCallingConv(CI->getCallingConv());
 
     // Finally, remove the old call, replacing any uses with the new one.
-    if (!CI->use_empty())
-      CI->replaceAllUsesWith(NewCall);
+    CI->replaceAllUsesWith(NewCall);
+
+
     CI->eraseFromParent();
   }
 }