Fix a really nasty logic error that VC noticed.
authorChris Lattner <sabre@nondot.org>
Mon, 12 Jul 2004 20:27:31 +0000 (20:27 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 12 Jul 2004 20:27:31 +0000 (20:27 +0000)
Reid, this might matter to you :)

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

lib/VMCore/Function.cpp

index 79384f98049865e6e95bf16b7d0c209558438ed1..d12c4dd44f583b56320b2d709267f7b473519942 100644 (file)
@@ -84,8 +84,8 @@ void Argument::setParent(Function *parent) {
 
 static bool removeDeadConstantUsers(Constant *C) {
   while (!C->use_empty()) {
-    if (Constant *C = dyn_cast<Constant>(C->use_back())) {
-      if (!removeDeadConstantUsers(C))
+    if (Constant *CU = dyn_cast<Constant>(C->use_back())) {
+      if (!removeDeadConstantUsers(CU))
         return false;  // Constant wasn't dead.
     } else {
       return false;    // Nonconstant user of the global.