Simple destructor to delete the hash data we created earlier.

llvm-svn: 144023
This commit is contained in:
Eric Christopher 2011-11-07 21:49:28 +00:00
parent 7e0e075322
commit e655ddfde1
2 changed files with 6 additions and 0 deletions

View File

@ -42,6 +42,11 @@ DwarfAccelTable::DwarfAccelTable(DwarfAccelTable::Atom atom) :
HeaderData(atom) { HeaderData(atom) {
} }
DwarfAccelTable::~DwarfAccelTable() {
for (size_t i = 0 ; i < Data.size(); ++i)
delete Data[i];
}
void DwarfAccelTable::AddName(StringRef Name, DIE* die) { void DwarfAccelTable::AddName(StringRef Name, DIE* die) {
// If the string is in the list already then add this die to the list // If the string is in the list already then add this die to the list
// otherwise add a new one. // otherwise add a new one.

View File

@ -239,6 +239,7 @@ public:
// Public Implementation // Public Implementation
public: public:
DwarfAccelTable(DwarfAccelTable::Atom Atom); DwarfAccelTable(DwarfAccelTable::Atom Atom);
~DwarfAccelTable();
void AddName(StringRef, DIE*); void AddName(StringRef, DIE*);
void FinalizeTable(AsmPrinter *, const char *); void FinalizeTable(AsmPrinter *, const char *);
void Emit(AsmPrinter *, MCSymbol *, DwarfDebug *); void Emit(AsmPrinter *, MCSymbol *, DwarfDebug *);