[llvm] [BOLT][DWARF][NFC] Fix DebugStrOffsetsWriter (PR #100672)

Alexander Yermolovich via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 26 15:52:51 PDT 2024


================
@@ -851,7 +851,10 @@ void DebugStrOffsetsWriter::initialize(DWARFUnit &Unit) {
         StrOffsetsSection.Data.data() + Contr->Base + Offset));
 }
 
-void DebugStrOffsetsWriter::updateAddressMap(uint32_t Index, uint32_t Address) {
+void DebugStrOffsetsWriter::updateAddressMap(uint32_t Index, uint32_t Address,
+                                             const DWARFUnit &Unit) {
+  assert(DebugStrOffsetFinalized.count(Unit.getOffset()) == 0 &&
+         "debug_str_offsets was already finalized for this CU.");
----------------
ayermolo wrote:

Change the message so it's easier to figure out which assertion was triggered.

https://github.com/llvm/llvm-project/pull/100672


More information about the llvm-commits mailing list