[llvm] [BOLT][DWARF][NFC] Refactor address writers (PR #98094)
Alexander Yermolovich via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 10 18:05:45 PDT 2024
================
@@ -395,6 +393,13 @@ DebugAddrWriter::DebugAddrWriter(BinaryContext *BC) : BC(BC) {
AddressStream = std::make_unique<raw_svector_ostream>(*Buffer);
}
+DebugAddrWriter::DebugAddrWriter(BinaryContext *BC,
+ const uint8_t AddressByteSize)
+ : BC(BC), AddressByteSize(AddressByteSize) {
+ Buffer = std::make_unique<AddressSectionBuffer>();
----------------
ayermolo wrote:
Remove redundant code, either call this constructor from :DebugAddrWriter(BinaryContext *BC) with some invalid AddressByteSize, or factor out to private "init" function.
https://github.com/llvm/llvm-project/pull/98094
More information about the llvm-commits
mailing list