aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2021-09-23 09:36:14 -0400
committerPatrick Palka <ppalka@redhat.com>2021-09-23 09:36:14 -0400
commitf6a05b23cc2e53c38e8321ddb5d2cbe40737e506 (patch)
treef249f64cdb673012bfb8adeba32252b4fa482651 /gcc
parent96783caedcbde030672350dd3ac2118fe4f8e73f (diff)
downloadgcc-f6a05b23cc2e53c38e8321ddb5d2cbe40737e506.zip
gcc-f6a05b23cc2e53c38e8321ddb5d2cbe40737e506.tar.gz
gcc-f6a05b23cc2e53c38e8321ddb5d2cbe40737e506.tar.bz2
c++: improve tree dump for templated decls
gcc/cp/ChangeLog: * ptree.c (cxx_print_decl): Dump the DECL_TEMPLATE_RESULT of a TEMPLATE_DECL. Dump the DECL_TEMPLATE_INFO rather than just printing its pointer value.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ptree.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/cp/ptree.c b/gcc/cp/ptree.c
index 7f140f5..1dcd764 100644
--- a/gcc/cp/ptree.c
+++ b/gcc/cp/ptree.c
@@ -51,6 +51,7 @@ cxx_print_decl (FILE *file, tree node, int indent)
}
else if (TREE_CODE (node) == TEMPLATE_DECL)
{
+ print_node (file, "result", DECL_TEMPLATE_RESULT (node), indent + 4);
print_node (file, "parms", DECL_TEMPLATE_PARMS (node), indent + 4);
indent_to (file, indent + 3);
fprintf (file, " full-name \"%s\"",
@@ -115,13 +116,8 @@ cxx_print_decl (FILE *file, tree node, int indent)
if (VAR_OR_FUNCTION_DECL_P (node)
&& DECL_TEMPLATE_INFO (node))
- {
- if (need_indent)
- indent_to (file, indent + 3);
- fprintf (file, " template-info %p",
- (void *) DECL_TEMPLATE_INFO (node));
- need_indent = false;
- }
+ print_node (file, "template-info", DECL_TEMPLATE_INFO (node),
+ indent + 4);
}
void