[llvm] [BOLT][DWARF][NFC] Refactor address writers (PR #98094)
Alexander Yermolovich via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 8 17:40:21 PDT 2024
================
@@ -1567,14 +1577,10 @@ void DWARFRewriter::finalizeDebugSections(
LocationListSectionContents->size());
}
- // AddrWriter should be finalized after debug_loc since more addresses can be
- // added there.
- if (AddrWriter->isInitialized()) {
- AddressSectionBuffer AddressSectionContents = AddrWriter->finalize();
- BC.registerOrUpdateNoteSection(".debug_addr",
- copyByteArray(AddressSectionContents),
- AddressSectionContents.size());
- }
+ AddressSectionBuffer AddressSectionContents = AddrWriter->finalize();
----------------
ayermolo wrote:
Should still check if it's initialized.
Also noticed small "bug" in original code. Should store in reference, and make const
https://github.com/llvm/llvm-project/pull/98094
More information about the llvm-commits
mailing list