diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-04 23:07:12 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-04 23:07:12 +0000 |
commit | d89380fc280420ecc35db3fd820a5851c2c26b8b (patch) | |
tree | b3acc6fc259e5daa73b96cfc494eae2d5af863bd /lib/VMCore/Value.cpp | |
parent | cb9aac2401030a04a2588ebad653fe1320c05ba2 (diff) | |
download | external_llvm-d89380fc280420ecc35db3fd820a5851c2c26b8b.zip external_llvm-d89380fc280420ecc35db3fd820a5851c2c26b8b.tar.gz external_llvm-d89380fc280420ecc35db3fd820a5851c2c26b8b.tar.bz2 |
revert r78048, it isn't worth using assertingvh here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78119 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Value.cpp')
-rw-r--r-- | lib/VMCore/Value.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp index 8710b94..2cdd552 100644 --- a/lib/VMCore/Value.cpp +++ b/lib/VMCore/Value.cpp @@ -57,14 +57,6 @@ Value::Value(const Type *ty, unsigned scid) } Value::~Value() { - // If this value is named, destroy the name. This should not be in a symtab - // at this point. - if (Name) - Name->Destroy(); - - // There should be no uses of this object anymore, remove it. - LeakDetector::removeGarbageObject(this); - // Notify all ValueHandles (if present) that this value is going away. if (HasValueHandle) ValueHandleBase::ValueIsDeleted(this); @@ -84,6 +76,14 @@ Value::~Value() { } #endif assert(use_empty() && "Uses remain when a value is destroyed!"); + + // If this value is named, destroy the name. This should not be in a symtab + // at this point. + if (Name) + Name->Destroy(); + + // There should be no uses of this object anymore, remove it. + LeakDetector::removeGarbageObject(this); } /// hasNUses - Return true if this Value has exactly N users. |