A couple of small changes. It was inconvenient that debug_tree didn't
print the name of a TYPENAME_TYPE, and once it did I noticed that the
indentation on the IDENTIFIER bits was wrong.
Tested x86_64-pc-linux-gnu, applied to trunk.
commit 3d660910ee64db8a09091482370ccc1162b781ca
Author: Jason Merrill <ja...@redhat.com>
Date: Tue Apr 26 18:02:47 2011 -0400
* ptree.c (cxx_print_type) [TYPENAME_TYPE]: Dump fullname.
(cxx_print_identifier): Correct indentation.
diff --git a/gcc/cp/ptree.c b/gcc/cp/ptree.c
index 49dc82b..a4c3ed5 100644
--- a/gcc/cp/ptree.c
+++ b/gcc/cp/ptree.c
@@ -99,6 +99,11 @@ cxx_print_type (FILE *file, tree node, int indent)
print_node (file, "expr", DECLTYPE_TYPE_EXPR (node), indent + 4);
return;
+ case TYPENAME_TYPE:
+ print_node (file, "fullname", TYPENAME_TYPE_FULLNAME (node),
+ indent + 4);
+ return;
+
default:
return;
}
@@ -175,12 +180,12 @@ cxx_print_identifier (FILE *file, tree node, int indent)
if (indent == 0)
fprintf (file, " ");
else
- indent_to (file, indent);
+ indent_to (file, indent + 4);
cxx_print_binding (file, IDENTIFIER_NAMESPACE_BINDINGS (node), "bindings");
if (indent == 0)
fprintf (file, " ");
else
- indent_to (file, indent);
+ indent_to (file, indent + 4);
cxx_print_binding (file, IDENTIFIER_BINDING (node), "local bindings");
print_node (file, "label", IDENTIFIER_LABEL_VALUE (node), indent + 4);
print_node (file, "template", IDENTIFIER_TEMPLATE (node), indent + 4);