mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Fix a nasty memory leak, caused by my revamp of the value symbol table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35195 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5f6a89562d
commit
91857da2f5
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user