Skip to content

Commit f905877

Browse files
authored
[LLVM][DWARF] Fix for memory leak (#81828)
This is followup to #8120. Missed a destuctor.
1 parent 2eaeae7 commit f905877

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,10 @@ class Dwarf5AccelTableWriter : public AccelTableWriter {
251251
const DWARF5AccelTableData &)>
252252
getIndexForEntry,
253253
bool IsSplitDwarf);
254-
254+
~Dwarf5AccelTableWriter() {
255+
for (DebugNamesAbbrev *Abbrev : AbbreviationsVector)
256+
Abbrev->~DebugNamesAbbrev();
257+
}
255258
void emit();
256259
};
257260
} // namespace

0 commit comments

Comments
 (0)