This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

C++ PATCH to improve print_tree for TEMPLATE_INFO nodes


I noticed we weren't doing this, and the default behavior didn't print the TREE_CHAIN.

Tested x86_64-pc-linux-gnu, applying to trunk.
commit 8a9510b8fe8fb127ed2f8e3f50e5a97d0a9c92ec
Author: Jason Merrill <jason@redhat.com>
Date:   Fri Jul 16 12:19:08 2010 -0400

    	* ptree.c (cxx_print_xnode): Handle TEMPLATE_INFO.

diff --git a/gcc/cp/ptree.c b/gcc/cp/ptree.c
index c2493c7..ee3f52f 100644
--- a/gcc/cp/ptree.c
+++ b/gcc/cp/ptree.c
@@ -207,6 +207,15 @@ cxx_print_xnode (FILE *file, tree node, int indent)
 	       TEMPLATE_PARM_IDX (node), TEMPLATE_PARM_LEVEL (node),
 	       TEMPLATE_PARM_ORIG_LEVEL (node));
       break;
+    case TEMPLATE_INFO:
+      print_node (file, "template", TI_TEMPLATE (node), indent+4);
+      print_node (file, "args", TI_ARGS (node), indent+4);
+      if (TI_PENDING_TEMPLATE_FLAG (node))
+	{
+	  indent_to (file, indent + 3);
+	  fprintf (file, "pending_template");
+	}
+      break;
     default:
       break;
     }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]