[llvm] f905877 - [LLVM][DWARF] Fix for memory leak (#81828)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 15 09:45:36 PST 2024
Author: Alexander Yermolovich
Date: 2024-02-15T09:45:32-08:00
New Revision: f905877f2039e97479425e4d78cbfde72f360b4d
URL: https://github.com/llvm/llvm-project/commit/f905877f2039e97479425e4d78cbfde72f360b4d
DIFF: https://github.com/llvm/llvm-project/commit/f905877f2039e97479425e4d78cbfde72f360b4d.diff
LOG: [LLVM][DWARF] Fix for memory leak (#81828)
This is followup to https://github.com/llvm/llvm-project/pull/8120.
Missed a destuctor.
Added:
Modified:
llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp b/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp
index 230d7add6d37cf..22d995a9cc3c56 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp
@@ -251,7 +251,10 @@ class Dwarf5AccelTableWriter : public AccelTableWriter {
const DWARF5AccelTableData &)>
getIndexForEntry,
bool IsSplitDwarf);
-
+ ~Dwarf5AccelTableWriter() {
+ for (DebugNamesAbbrev *Abbrev : AbbreviationsVector)
+ Abbrev->~DebugNamesAbbrev();
+ }
void emit();
};
} // namespace
More information about the llvm-commits
mailing list