[llvm] [RFC] Emit dwarf data for signature-changed or new functions (PR #157349)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 23 22:59:41 PDT 2025


yonghong-song wrote:

@dzhidzhoev Your above proposal should work if the function name is something like 'foo.llvm.<hash>'. In this case, we can generate proper debug types and arguments and have proper meta data pointing to the func 'foo.llvm.<hash>' itself.

But if the function is optimzied (e.g., argument promotion, dead argument/return value elimination, etc), things become difficult. In such case, we have *only one* function. If we try to create two Subprogram, only one of them can be attached to the function, and the other Subprogram will not show up in eventual dwarf since there is no references in the code for this other Subprogram. One way to resolve this is to put it into another compile unit which is what I was doing now. Any further suggestions?

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


More information about the llvm-commits mailing list