[PATCH] D108261: [DebugInfo] Fix end_sequence of debug_line in LTO Object

Kyungwoo Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 13 12:05:58 PST 2021


kyulee added inline comments.


================
Comment at: llvm/lib/MC/MCDwarf.cpp:226
   // Generate DWARF line end entry.
   MCOS->emitDwarfLineEndEntry(Section, LastLabel);
 }
----------------
kyulee wrote:
> dblaikie wrote:
> > Would be nice if we could eliminate the need for this case - since any time this gets used it risks being because a line table was allowed to "flow off the end" further than it should.
> > 
> > What would it be like if we handled the line table similar to the way ranges are handled? Always terminated at the end of each function, but then extended if the next function happens to start immediately after the last entry ended?
> Yeah. That sounds great, but it seems similar to what I initially tried, which tracked the end label of function as functions were added.
> But I wonder whether there is a case where the end label of the prior function is not matched with the start label of the next function due to some alignment, etc? In that case, do we want to terminate the line table for the prior function because of mismatch? I guess that seems an overkill. 
> 
>From the second thought, `addLineEntry` is used during function emission (which is independent of Range operation) while `Range` is added at the end of function. It doesn't seem to work to extend the line table using the end of function range. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108261/new/

https://reviews.llvm.org/D108261



More information about the llvm-commits mailing list