summaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2008-03-14 22:03:02 +0000
committerGabor Greif <ggreif@gmail.com>2008-03-14 22:03:02 +0000
commit59dc98de2f79c027eb6860443daee260710b1405 (patch)
tree826e84a229b60d3e74f1fb42e1a759927f9d9556 /include/llvm
parentf8e43be758c94e21634d1e9e7c22fd5d218f7423 (diff)
downloadllvm-59dc98de2f79c027eb6860443daee260710b1405.tar.gz
llvm-59dc98de2f79c027eb6860443daee260710b1405.tar.bz2
llvm-59dc98de2f79c027eb6860443daee260710b1405.tar.xz
move the Use destructor where it belongs to
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48376 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Use.h4
-rw-r--r--include/llvm/Value.h6
2 files changed, 4 insertions, 6 deletions
diff --git a/include/llvm/Use.h b/include/llvm/Use.h
index c5a3212ed8..c81a903e8b 100644
--- a/include/llvm/Use.h
+++ b/include/llvm/Use.h
@@ -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.
diff --git a/include/llvm/Value.h b/include/llvm/Value.h
index 0e9d2f1c73..4604dae6ed 100644
--- a/include/llvm/Value.h
+++ b/include/llvm/Value.h
@@ -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;