[llvm] [llvm][DebugInfo] Unwrap template parameters that are typedefs when reconstructing DIE names (PR #168734)

Michael Buch via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 20 09:49:29 PST 2025


Michael137 wrote:

> ie: we should either use the preferred name for both structural and textual, or neither. So we can do it for both for lldb, and for neither otherwise. For now we do it for neither otherwise, but we split the difference when tuning for lldb.

Thanks for elaborating, this makes sense! Not great we have to do this for LLDB, but workable I suppose (given the whole AST restriction LLDB is working with -- i think we discussed using the demangled names for typenames, but decided using the `TypePrinter` gives us some nice options for presenting typenames in a user-friendly way, which the demangler currently can't do).

> But I'm not sure if I explained the problem I was pointing out - not that the typedef is a problem, but the fact that the DWARF produced for the template specialization varies depending on whether the typedef was produced for other reasons. We should probably not do that - we should probably produce and use the typedef always when it's the preferred name.

Aah I see, yes I didn't catch this point the first time I read the issue. I'll take a look at this when I get time

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


More information about the llvm-commits mailing list