On Fri, Jul 21, 2017 at 12:57 PM David Blaikie <dblai...@gmail.com> wrote:
> On Fri, Jul 21, 2017 at 11:34 AM David Majnemer via Phabricator < > revi...@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... ) > (in fact, the DWARF doesn't necessarily have any mention of 'x' or that it's a typedef of int... - the DW_TAG_template_type_parameter says the parameter is int, so it's not not impossible to figure it all out - though that's predicated on another patch Paul has, to include DW_TAG_template_type_parameters of template declarations (which Clang currently doesn't do - saves space, etc)) > > 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 >> >> >> >>
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits