[llvm] [debug] Support 32-bit column number in DILocation (PR #201269)
Cody Tapscott via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 11 06:54:23 PDT 2026
topolarity wrote:
> Would it be feasible to instead just adopt the line-number field of DILocations to store that index?
We could do that, but it'd require some end-of-pipeline mangling.
We're in an awkward position requirements-wise, because we want to preserve the "important" fields for native DWARF users (`perf`, etc.) incl. true line number, file, etc. At the same time, we also carry our custom debuginfo format that needs this "IR PC" to index into. The column was a compromise solution to leave the important bits in native DWARF while still supporting the new format.
Anyway it might be possible to do a post-MC DWARF filtering step that allows us to extract our "Machine PC -> IR PC" map and then swap back in the "native" DWARF info in place of the IR-PC-as-line-number we seeded the pipeline with.
> you would lose some information when source locations get merged and line numbers replaced with zero
Yeah we're prepared to lose some information in those cases
https://github.com/llvm/llvm-project/pull/201269
More information about the llvm-commits
mailing list