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

Grigory Pastukhov via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 30 14:55:27 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);
----------------
grigorypas wrote:

Created refactoring PR: #151401

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


More information about the llvm-commits mailing list