[llvm-commits] [llvm] r48376 - in /llvm/trunk/include/llvm: Use.h Value.h

Gabor Greif ggreif at gmail.com
Fri Mar 14 15:03:02 PDT 2008


Author: ggreif
Date: Fri Mar 14 17:03:02 2008
New Revision: 48376

URL: http://llvm.org/viewvc/llvm-project?rev=48376&view=rev
Log:
move the Use destructor where it belongs to

Modified:
    llvm/trunk/include/llvm/Use.h
    llvm/trunk/include/llvm/Value.h

Modified: llvm/trunk/include/llvm/Use.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Use.h?rev=48376&r1=48375&r2=48376&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Use.h (original)
+++ llvm/trunk/include/llvm/Use.h Fri Mar 14 17:03:02 2008
@@ -37,7 +37,9 @@
 
   Use(Value *V, User *U) { init(V, U); }
   Use(const Use &U) { init(U.Val, U.U); }
-  inline ~Use();
+  inline ~Use() {
+    if (Val) removeFromList();
+  }
 
   /// Default ctor - This leaves the Use completely unitialized.  The only thing
   /// that is valid to do with this use is to call the "init" method.

Modified: llvm/trunk/include/llvm/Value.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Value.h?rev=48376&r1=48375&r2=48376&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Value.h (original)
+++ llvm/trunk/include/llvm/Value.h Fri Mar 14 17:03:02 2008
@@ -46,7 +46,7 @@
 /// the super class of other important classes such as Instruction and Function.
 /// All Values have a Type. Type is not a subclass of Value. All types can have
 /// a name and they should belong to some Module. Setting the name on the Value
-/// automatically update's the module's symbol table.
+/// automatically updates the module's symbol table.
 ///
 /// Every value has a "use list" that keeps track of which other Values are
 /// using this Value.
@@ -229,10 +229,6 @@
   if (Val) Val->addUse(*this);
 }
 
-Use::~Use() {
-  if (Val) removeFromList();
-}
-
 void Use::set(Value *V) {
   if (Val) removeFromList();
   Val = V;





More information about the llvm-commits mailing list