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

Alexander Yermolovich via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 26 10:28:08 PDT 2024


================
@@ -906,6 +906,7 @@ void DebugStrOffsetsWriter::finalizeSection(DWARFUnit &Unit,
   }
 
   StrOffsetSectionWasModified = false;
+  DebugStrOffsetFinalized[Unit.getOffset()] = true;
----------------
ayermolo wrote:

see if this can be part of assert with .insert and checking output bool for if it's a new entry.
This way if asserts are disabled we don't have to insert anything in this.
You might need [[maybe_unused]] on definition so that clang doesn't report warnings if it not being used when asserts are disabled.

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


More information about the llvm-commits mailing list