Simple destructor to delete the hash data we created earlier.
authorEric Christopher <echristo@apple.com>
Mon, 7 Nov 2011 21:49:28 +0000 (21:49 +0000)
committerEric Christopher <echristo@apple.com>
Mon, 7 Nov 2011 21:49:28 +0000 (21:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144023 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp
lib/CodeGen/AsmPrinter/DwarfAccelTable.h

index 2f175d46e1838884a3244a8141f4fb9f58e0e270..6a32ab62d403a28b927b3475862c209dd3cdfd34 100644 (file)
@@ -42,6 +42,11 @@ DwarfAccelTable::DwarfAccelTable(DwarfAccelTable::Atom atom) :
   HeaderData(atom) {
 }
 
+DwarfAccelTable::~DwarfAccelTable() {
+  for (size_t i = 0 ; i < Data.size(); ++i)
+    delete Data[i];
+}
+
 void DwarfAccelTable::AddName(StringRef Name, DIE* die) {
   // If the string is in the list already then add this die to the list
   // otherwise add a new one.
index 2d3f4fd946d330385f4c738cf916d938dc904393..4fc6118274e3d277a37b5b9dde0a9405c6338b47 100644 (file)
@@ -239,6 +239,7 @@ public:
   // Public Implementation
  public:
   DwarfAccelTable(DwarfAccelTable::Atom Atom);
+  ~DwarfAccelTable();
   void AddName(StringRef, DIE*);
   void FinalizeTable(AsmPrinter *, const char *);
   void Emit(AsmPrinter *, MCSymbol *, DwarfDebug *);