[llvm-commits] [llvm] r147673 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp
Eric Christopher
echristo at apple.com
Fri Jan 6 11:35:05 PST 2012
Author: echristo
Date: Fri Jan 6 13:35:04 2012
New Revision: 147673
URL: http://llvm.org/viewvc/llvm-project?rev=147673&view=rev
Log:
Fix a leak I noticed while reviewing the accelerator table changes. Passes
lldb testsuite.
rdar://10652330
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp?rev=147673&r1=147672&r2=147673&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp Fri Jan 6 13:35:04 2012
@@ -51,6 +51,11 @@
DwarfAccelTable::~DwarfAccelTable() {
for (size_t i = 0, e = Data.size(); i < e; ++i)
delete Data[i];
+ for (StringMap<DataArray>::iterator
+ EI = Entries.begin(), EE = Entries.end(); EI != EE; ++EI)
+ for (DataArray::iterator DI = (*EI).second.begin(),
+ DE = (*EI).second.end(); DI != DE; ++DI)
+ delete (*DI);
}
void DwarfAccelTable::AddName(StringRef Name, DIE* die, char Flags) {
More information about the llvm-commits
mailing list