[llvm] [RFC] Emit dwarf data for signature-changed or new functions (PR #157349)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 3 08:27:51 PDT 2025
yonghong-song wrote:
> Could you please add more tests for that?
>
> 1. A test to check what EmitChangedFuncDebugInfo produces.
>
> 2. A test to check how ArgumentPromotion pass works together with EmitChangedFuncDebugInfo (this may also be relevant for other passes that modify function signatures).
>
> 3. Would be nice to have a cross-project test to see if lldb can handle the resulting DWARFs properly. It can check whether this problem does not occur.
>
>
> > I think, having two functions with the same DW_AT_name but different formal parameters may indeed interfere with debugger name resolution: debugger users will be able to call the function with the signature not matching the signature from the source code.
> > Probably, DW_TAG_subprogram with the final list of parameters (`0x01c2663c: DW_TAG_subprogram` in your example) should have DW_AT_artifical to prevent that (DW_AT_artifical can be emitted by raising DIFlagArtificial in the corresponding DISubprogram).
>
> I think it will be easier to review this if we have examples of LLVM IR input + expected LLVM IR or DWARF output in form of tests.
Thanks for the suggestions. Among other things I mentioned in the description, I will add test cases as well in the next revision.
https://github.com/llvm/llvm-project/pull/157349
More information about the llvm-commits
mailing list