[llvm] [BOLT][DebugInfo] Add DWARF64 support for BOLT (PR #206437)

via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 12 23:47:18 PDT 2026


================
@@ -2125,9 +2142,14 @@ static void UpdateStrAndStrOffsets(StringRef StrDWOContent,
       // Updating str offsets.
       if (StrOffsetsOutData.empty())
         StrOffsetsOutData = StrOffsetsContent.str();
-      llvm::support::endian::write32(
-          &StrOffsetsOutData[HeaderOffset + I * SizeOfOffset],
-          static_cast<uint32_t>(AccumulatedStrLen), Endian);
+      if (Format == dwarf::DwarfFormat::DWARF64)
----------------
Thrrreeee wrote:

It may be unnecessary. This is the only call site that writes directly into memory buffer `(void *)`, while the writeOffset/writeDwarfOffset() operates on a `raw_ostream`. Reusing it would require an additional overload solely for this call site. I would prefer to keep the explicit write32/write64 handling here.

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


More information about the llvm-commits mailing list