[llvm-commits] CVS: llvm/lib/VMCore/Function.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Jul 12 13:27:41 PDT 2004



Changes in directory llvm/lib/VMCore:

Function.cpp updated: 1.74 -> 1.75

---
Log message:

Fix a really nasty logic error that VC noticed.
Reid, this might matter to you :)



---
Diffs of the changes:  (+2 -2)

Index: llvm/lib/VMCore/Function.cpp
diff -u llvm/lib/VMCore/Function.cpp:1.74 llvm/lib/VMCore/Function.cpp:1.75
--- llvm/lib/VMCore/Function.cpp:1.74	Sun Jul 11 20:17:34 2004
+++ llvm/lib/VMCore/Function.cpp	Mon Jul 12 15:27:31 2004
@@ -84,8 +84,8 @@
 
 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.





More information about the llvm-commits mailing list