[llvm] [llvm][dsymutil] Use the DW_AT_name of the uniqued DIE for insertion into .debug_names (PR #168513)

Michael Buch via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 18 09:59:14 PST 2025


Michael137 wrote:

> Yeah, mixed feelings - as I've said elsewhere, there are lots of ways one could end up with equivalent-but-not-identical names in DWARF, and so supporting those correctly in dsymutil seems nice (especially if you expect to/likely will support inputs from different compilers, or at least different compiler versions - we wouldn't want an improvement to clang pretty name printing to break dsymutil).
> 
> But, similarly, clang should generate names that agree with itself and are exactly as unique as the linkage and isn't in this case.

Yea agreed. I still want to strip the file/column info from DW_AT_names. But we probably need the dsymutil side fix too, for the reasons you enumerated. Long-term I'd love for `-gsimple-template-names` to also work for anonymous structures, but as you said in a different thread, that will still need some additional DWARF support. Also we haven't enabled the flag on Darwin

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


More information about the llvm-commits mailing list