[PATCH] D35715: Preserve typedef names in debug info for template type parameters

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 21 12:57:26 PDT 2017


On Fri, Jul 21, 2017 at 11:34 AM David Majnemer via Phabricator <
reviews at reviews.llvm.org> wrote:

> majnemer added a comment.
>
> This might be a silly question but why not do this by default?
>

I'd hazard a guess that GDB wouldn't cope well with this (in terms of
identifying templates as the same type under this flag - one TU has a
function that has a parameter type with the name "foo<int>" and the other
has a type named "foo<f>" (where f is a typedef of int) - going to guess
GDB doesn't realize those are the same type... )

Also, Paul: This doesn't change the type that's referenced in the
DW_TAG_template_type_parameter? Would it make sense to actually do this the
opposite way - use the canonical name for the name, but have the
DW_TAG_template_type_parameter refer to the typedef? Still means the type
can vary between different translation units, which seems a bit difficult
to deal with, but probably harmless in that case?

Would still mean long/unweildy names, though, which I guess is what's being
avoided/addressed here.


>
>
> https://reviews.llvm.org/D35715
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170721/7ae114a7/attachment.html>


More information about the cfe-commits mailing list