c++: improve debug_tree for templated types/decls
commit1531de6375afddcd27ea33a23248fa87bfed147b
authorPatrick Palka <ppalka@redhat.com>
Fri, 11 Aug 2023 16:50:52 +0000 (11 12:50 -0400)
committerPatrick Palka <ppalka@redhat.com>
Fri, 11 Aug 2023 16:50:52 +0000 (11 12:50 -0400)
treeeace17708dbaa8c33881205681a739a8ba408449
parenta4238f6db879abc048282d2d26442e68dc9427ea
c++: improve debug_tree for templated types/decls

gcc/cp/ChangeLog:

* ptree.cc (cxx_print_decl): Check for DECL_LANG_SPECIFIC and
TS_DECL_COMMON only when necessary.  Print DECL_TEMPLATE_INFO
for all decls that have it, not just VAR_DECL or FUNCTION_DECL.
Also print DECL_USE_TEMPLATE.
(cxx_print_type): Print TYPE_TEMPLATE_INFO.
<case BOUND_TEMPLATE_TEMPLATE_PARM>: Don't print TYPE_TI_ARGS
anymore.
<case TEMPLATE_TYPE/TEMPLATE_PARM>: Print TEMPLATE_TYPE_PARM_INDEX
instead of printing the index, level and original level
individually.
gcc/cp/ptree.cc