[llvm-commits] [llvm] r144023 - in /llvm/trunk/lib/CodeGen/AsmPrinter: DwarfAccelTable.cpp DwarfAccelTable.h

Eric Christopher echristo at apple.com
Mon Nov 7 13:49:28 PST 2011


Author: echristo
Date: Mon Nov  7 15:49:28 2011
New Revision: 144023

URL: http://llvm.org/viewvc/llvm-project?rev=144023&view=rev
Log:
Simple destructor to delete the hash data we created earlier.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.h

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp?rev=144023&r1=144022&r2=144023&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp Mon Nov  7 15:49:28 2011
@@ -42,6 +42,11 @@
   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.

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.h?rev=144023&r1=144022&r2=144023&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.h Mon Nov  7 15:49:28 2011
@@ -239,6 +239,7 @@
   // Public Implementation
  public:
   DwarfAccelTable(DwarfAccelTable::Atom Atom);
+  ~DwarfAccelTable();
   void AddName(StringRef, DIE*);
   void FinalizeTable(AsmPrinter *, const char *);
   void Emit(AsmPrinter *, MCSymbol *, DwarfDebug *);





More information about the llvm-commits mailing list