[AsmPrinter] Destroy allocated DIEAbbrevs on teardown.
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfFile.cpp
index cafaabba5a365ccd4683f419e3bb5c682c6950d7..1060366a8ba313671e1e2cfba5c5af6b189c5ffb 100644 (file)
@@ -20,7 +20,10 @@ namespace llvm {
 DwarfFile::DwarfFile(AsmPrinter *AP, StringRef Pref, BumpPtrAllocator &DA)
     : Asm(AP), StrPool(DA, *Asm, Pref) {}
 
-DwarfFile::~DwarfFile() {}
+DwarfFile::~DwarfFile() {
+  for (DIEAbbrev *Abbrev : Abbreviations)
+    Abbrev->~DIEAbbrev();
+}
 
 // Define a unique number for the abbreviation.
 //