[llvm] [BOLT] Fix debug line emission for functions in multiple compilation units (PR #151230)

Paschalis Mpeis via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 30 01:25:11 PDT 2025


================
@@ -1568,23 +1568,19 @@ unsigned BinaryContext::addDebugFilenameToUnit(const uint32_t DestCUID,
   DWARFCompileUnit *SrcUnit = DwCtx->getCompileUnitForOffset(SrcCUID);
   const DWARFDebugLine::LineTable *LineTable =
       DwCtx->getLineTableForUnit(SrcUnit);
-  const std::vector<DWARFDebugLine::FileNameEntry> &FileNames =
-      LineTable->Prologue.FileNames;
+  const DWARFDebugLine::FileNameEntry &FileNameEntry =
+      LineTable->Prologue.getFileNameEntry(FileIndex);
----------------
paschalis-mpeis wrote:

Maybe some of the refactoring changes could be separate PRs that come before your big change?
Like this example here.

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


More information about the llvm-commits mailing list