[llvm] [LLVM][DWARF] Fix for memory leak (PR #81828)

Felipe de Azevedo Piovezan via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 15 09:12:28 PST 2024


================
@@ -251,7 +251,10 @@ class Dwarf5AccelTableWriter : public AccelTableWriter {
           const DWARF5AccelTableData &)>
           getIndexForEntry,
       bool IsSplitDwarf);
-
+  ~Dwarf5AccelTableWriter() {
+    for (DebugNamesAbbrev *Abbrev : AbbreviationsVector)
+      Abbrev->~DebugNamesAbbrev();
+  }
----------------
felipepiovezan wrote:

(I'm not familiar with how the abbrev stuff is implemented, so can't speak as to how much time this allocator is saving)

https://github.com/llvm/llvm-project/pull/81828


More information about the llvm-commits mailing list