OSDN Git Service

2008-10-09 Thomas Koenig <tkoenig@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / print-tree.c
index a310ec4..fb9f126 100644 (file)
@@ -74,12 +74,12 @@ dump_addr (FILE *file, const char *prefix, const void *addr)
 void
 print_node_brief (FILE *file, const char *prefix, const_tree node, int indent)
 {
-  enum tree_code_class class;
+  enum tree_code_class tclass;
 
   if (node == 0)
     return;
 
-  class = TREE_CODE_CLASS (TREE_CODE (node));
+  tclass = TREE_CODE_CLASS (TREE_CODE (node));
 
   /* Always print the slot this node is in, and its code, address and
      name if any.  */
@@ -88,7 +88,7 @@ print_node_brief (FILE *file, const char *prefix, const_tree node, int indent)
   fprintf (file, "%s <%s", prefix, tree_code_name[(int) TREE_CODE (node)]);
   dump_addr (file, " ", node);
 
-  if (class == tcc_declaration)
+  if (tclass == tcc_declaration)
     {
       if (DECL_NAME (node))
        fprintf (file, " %s", IDENTIFIER_POINTER (DECL_NAME (node)));
@@ -99,7 +99,7 @@ print_node_brief (FILE *file, const char *prefix, const_tree node, int indent)
        fprintf (file, " %c.%u", TREE_CODE (node) == CONST_DECL ? 'C' : 'D',
                 DECL_UID (node));
     }
-  else if (class == tcc_type)
+  else if (tclass == tcc_type)
     {
       if (TYPE_NAME (node))
        {
@@ -188,7 +188,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
   int hash;
   struct bucket *b;
   enum machine_mode mode;
-  enum tree_code_class class;
+  enum tree_code_class tclass;
   int len;
   int i;
   expanded_location xloc;
@@ -198,7 +198,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
     return;
   
   code = TREE_CODE (node);
-  class = TREE_CODE_CLASS (code);
+  tclass = TREE_CODE_CLASS (code);
 
   /* Don't get too deep in nesting.  If the user wants to see deeper,
      it is easy to use the address of a lowest-level node
@@ -210,7 +210,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
       return;
     }
 
-  if (indent > 8 && (class == tcc_type || class == tcc_declaration))
+  if (indent > 8 && (tclass == tcc_type || tclass == tcc_declaration))
     {
       print_node_brief (file, prefix, node, indent);
       return;
@@ -251,7 +251,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
   dump_addr (file, " ", node);
 
   /* Print the name, if any.  */
-  if (class == tcc_declaration)
+  if (tclass == tcc_declaration)
     {
       if (DECL_NAME (node))
        fprintf (file, " %s", IDENTIFIER_POINTER (DECL_NAME (node)));
@@ -262,7 +262,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
        fprintf (file, " %c.%u", TREE_CODE (node) == CONST_DECL ? 'C' : 'D',
                 DECL_UID (node));
     }
-  else if (class == tcc_type)
+  else if (tclass == tcc_type)
     {
       if (TYPE_NAME (node))
        {
@@ -461,8 +461,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
          print_node (file, "size", DECL_SIZE (node), indent + 4);
          print_node (file, "unit size", DECL_SIZE_UNIT (node), indent + 4);
          
-         if (TREE_CODE (node) != FUNCTION_DECL
-             || DECL_INLINE (node) || DECL_BUILT_IN (node))
+         if (TREE_CODE (node) != FUNCTION_DECL || DECL_BUILT_IN (node))
            indent_to (file, indent + 3);
          
          if (DECL_USER_ALIGN (node))
@@ -927,6 +926,12 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
        case TARGET_OPTION_NODE:
          cl_target_option_print (file, indent + 4, TREE_TARGET_OPTION (node));
          break;
+       case IMPORTED_DECL:
+         fprintf (file, " imported declaration");
+         print_node_brief (file, "associated declaration",
+                           IMPORTED_DECL_ASSOCIATED_DECL (node),
+                           indent + 4);
+         break;
 
        default:
          if (EXCEPTIONAL_CLASS_P (node))