OSDN Git Service

Add NIOS2 support. Code from SourceyG++.
[pf3gnuchains/gcc-fork.git] / gcc / print-tree.c
index a44d23a..f1a2455 100644 (file)
@@ -1,6 +1,6 @@
 /* Prints out tree in human readable form - GCC
    Copyright (C) 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -25,13 +25,13 @@ along with GCC; see the file COPYING3.  If not see
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
-#include "real.h"
-#include "fixed-value.h"
 #include "ggc.h"
 #include "langhooks.h"
 #include "tree-iterator.h"
 #include "diagnostic.h"
+#include "gimple-pretty-print.h"
 #include "tree-flow.h"
+#include "tree-pass.h"
 
 /* Define the hash table of nodes already seen.
    Such nodes are not repeated; brief cross-references are used.  */
@@ -95,10 +95,22 @@ print_node_brief (FILE *file, const char *prefix, const_tree node, int indent)
        fprintf (file, " %s", IDENTIFIER_POINTER (DECL_NAME (node)));
       else if (TREE_CODE (node) == LABEL_DECL
               && LABEL_DECL_UID (node) != -1)
-       fprintf (file, " L.%d", (int) LABEL_DECL_UID (node));
+       {
+         if (dump_flags & TDF_NOUID)
+           fprintf (file, " L.xxxx");
+         else
+           fprintf (file, " L.%d", (int) LABEL_DECL_UID (node));
+       }
       else
-       fprintf (file, " %c.%u", TREE_CODE (node) == CONST_DECL ? 'C' : 'D',
-                DECL_UID (node));
+       {
+         if (dump_flags & TDF_NOUID)
+           fprintf (file, " %c.xxxx",
+                    TREE_CODE (node) == CONST_DECL ? 'C' : 'D');
+         else
+           fprintf (file, " %c.%u",
+                    TREE_CODE (node) == CONST_DECL ? 'C' : 'D',
+                    DECL_UID (node));
+       }
     }
   else if (tclass == tcc_type)
     {
@@ -260,10 +272,20 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
        fprintf (file, " %s", IDENTIFIER_POINTER (DECL_NAME (node)));
       else if (code == LABEL_DECL
               && LABEL_DECL_UID (node) != -1)
-       fprintf (file, " L.%d", (int) LABEL_DECL_UID (node));
+       {
+         if (dump_flags & TDF_NOUID)
+           fprintf (file, " L.xxxx");
+         else
+           fprintf (file, " L.%d", (int) LABEL_DECL_UID (node));
+       }
       else
-       fprintf (file, " %c.%u", code == CONST_DECL ? 'C' : 'D',
-                DECL_UID (node));
+       {
+         if (dump_flags & TDF_NOUID)
+           fprintf (file, " %c.xxxx", code == CONST_DECL ? 'C' : 'D');
+         else
+           fprintf (file, " %c.%u", code == CONST_DECL ? 'C' : 'D',
+                    DECL_UID (node));
+       }
     }
   else if (tclass == tcc_type)
     {
@@ -582,8 +604,9 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
 
       /* The transparent-union flag is used for different things in
         different nodes.  */
-      if (code == UNION_TYPE && TYPE_TRANSPARENT_UNION (node))
-       fputs (" transparent-union", file);
+      if ((code == UNION_TYPE || code == RECORD_TYPE)
+         && TYPE_TRANSPARENT_AGGR (node))
+       fputs (" transparent-aggr", file);
       else if (code == ARRAY_TYPE
               && TYPE_NONALIASED_COMPONENT (node))
        fputs (" nonaliased-component", file);