[llvm] [DebugInfo] Add clang flag to enable function-level debug line attribution (PR #93985)
Paul T Robinson via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 5 13:52:18 PDT 2024
pogo59 wrote:
> Currently, Clang generates function line information in the debug_line section without directly linking the line entries to their originating functions.
If you compile with -ffunction-sections, then there won't be any sequences in the line table that cross function boundaries. There will always be a DW_LNE_set_address opcode that points back to the start of the function. This pointer is in the opposite direction to what you are looking for, so it requires a bit more analysis to associate sequences with subprograms, but the information is there. Is that sufficient?
https://github.com/llvm/llvm-project/pull/93985
More information about the llvm-commits
mailing list