[llvm-commits] [llvm] r51074 - /llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp

Gabor Greif ggreif at gmail.com
Tue May 13 15:31:30 PDT 2008


Author: ggreif
Date: Tue May 13 17:31:30 2008
New Revision: 51074

URL: http://llvm.org/viewvc/llvm-project?rev=51074&view=rev
Log:
do not forget to clear out Val

Modified:
    llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp

Modified: llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp?rev=51074&r1=51073&r2=51074&view=diff

==============================================================================
--- llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp (original)
+++ llvm/branches/ggreif/use-diet/lib/VMCore/Use.cpp Tue May 13 17:31:30 2008
@@ -26,14 +26,20 @@
     if (V1) {
       removeFromList();
     }
+
     if (V2) {
       RHS.removeFromList();
       Val = V2;
       V2->addUse(*this);
+    } else {
+      Val = 0;
     }
+
     if (V1) {
       RHS.Val = V1;
       V1->addUse(RHS);
+    } else {
+      RHS.Val = 0;
     }
   }
 }





More information about the llvm-commits mailing list