[llvm] [BOLT][DWARF][NFC] Refactor address writers (PR #98094)
Sayhaan Siddiqui via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 10 14:18:33 PDT 2024
================
@@ -490,10 +479,19 @@ void DebugAddrWriter::update(DIEBuilder &DIEBlder, DWARFUnit &CU) {
WriteAddress(0);
WriteAddress(Val.second);
}
- updateAddressBase(DIEBlder, *this, CU, Offset);
+ return std::nullopt;
}
-void DebugAddrWriterDwarf5::update(DIEBuilder &DIEBlder, DWARFUnit &CU) {
+void DebugAddrWriterDwarf5::updateAddrBase(DIEBuilder &DIEBlder, DWARFUnit &CU,
+ const uint64_t Offset) {
+ /// Header for DWARF5 has size 8, so we add it to the offset.
+ updateAddressBase(DIEBlder, *this, CU, Offset + HeaderSize);
+}
+
+DenseMap<uint64_t, uint64_t> DebugAddrWriter::UnmodifiedAddressOffsets;
----------------
sayhaan wrote:
This is the static one, wouldn't we need to define it in the .cpp file since it's static?
https://stackoverflow.com/questions/35565971/undefined-reference-to-declared-c-static-member-variable
https://github.com/llvm/llvm-project/pull/98094
More information about the llvm-commits
mailing list