move the Use destructor where it belongs to
authorGabor Greif <ggreif@gmail.com>
Fri, 14 Mar 2008 22:03:02 +0000 (22:03 +0000)
committerGabor Greif <ggreif@gmail.com>
Fri, 14 Mar 2008 22:03:02 +0000 (22:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48376 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Use.h
include/llvm/Value.h

index c5a3212ed83e5f6e98c82edf00bb1092e2c6efa1..c81a903e8b0e6e1074fe3e7ca53e233e27b6463c 100644 (file)
@@ -37,7 +37,9 @@ public:
 
   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.
index 0e9d2f1c73d763845f1c88a8c4494bc3c6fb8493..4604dae6ed9e3fc4a762674598aab8e9dc8b223a 100644 (file)
@@ -46,7 +46,7 @@ typedef StringMapEntry<Value*> ValueName;
 /// 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 @@ void Use::init(Value *v, User *user) {
   if (Val) Val->addUse(*this);
 }
 
-Use::~Use() {
-  if (Val) removeFromList();
-}
-
 void Use::set(Value *V) {
   if (Val) removeFromList();
   Val = V;