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

Alexander Yermolovich via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 26 14:44:25 PDT 2024


================
@@ -77,6 +77,9 @@ static void addStringHelper(DebugStrOffsetsWriter &StrOffstsWriter,
                             DIEValue &DIEAttrInfo, StringRef Str) {
   uint32_t NewOffset = StrWriter.addString(Str);
   if (Unit.getVersion() >= 5) {
+    assert(StrOffstsWriter.getDebugStrOffsetsFinalized().count(
----------------
ayermolo wrote:

Move this inside updateAddressMap. There is no guarantee that in the future it might not be called from somewhere else.

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


More information about the llvm-commits mailing list