projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f6a895
)
Fix a nasty memory leak, caused by my revamp of the value symbol table.
author
Chris Lattner
<sabre@nondot.org>
Tue, 20 Mar 2007 00:18:10 +0000
(
00:18
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Tue, 20 Mar 2007 00:18:10 +0000
(
00:18
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35195
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Value.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Value.cpp
b/lib/VMCore/Value.cpp
index 8bc99a8590bf3bab560052b053308142af798c9e..790ae17a9839dcb282a03e4be27454b0f322ab59 100644
(file)
--- a/
lib/VMCore/Value.cpp
+++ b/
lib/VMCore/Value.cpp
@@
-56,6
+56,11
@@
Value::~Value() {
#endif
assert(use_begin() == use_end() && "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);
}