[llvm] [BOLT][DWARF] Slice .debug_str from the DWP for each CU (PR #159540)

Alexander Yermolovich via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 2 16:49:14 PST 2025


================
@@ -1723,7 +1723,66 @@ StringRef getSectionName(const SectionRef &Section) {
   return Name;
 }
 
-// Extracts an appropriate slice if input is DWP.
+// Exctracts some appropriate slices of .debug_str.dwo from DWP.
+// Updates the .debug_str_offets.dwo for CUs.
+void UpdateStrAndStrOffsets(StringRef StrDWOContent,
+                            StringRef StrOffsetsContent,
+                            SmallVectorImpl<StringRef> &StrDWOOutData,
+                            std::string &StrOffsetsOutData,
+                            unsigned DwarfVersion, bool IsLittleEndian) {
+  const llvm::endianness Endian =
+      IsLittleEndian ? llvm::endianness::little : llvm::endianness::big;
+  // ignore DWARF64
----------------
ayermolo wrote:

nit. 
Comment not really necessary.

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


More information about the llvm-commits mailing list