OSDN Git Service

2008-04-28 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / cp / ptree.c
index 8a7ba94..c91cb15 100644 (file)
@@ -1,13 +1,14 @@
 /* Prints out trees in human readable form.
    Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998,
 /* Prints out trees in human readable form.
    Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
+   Free Software Foundation, Inc.
    Hacked by Michael Tiemann (tiemann@cygnus.com)
 
 This file is part of GCC.
 
 GCC is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
    Hacked by Michael Tiemann (tiemann@cygnus.com)
 
 This file is part of GCC.
 
 GCC is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
 any later version.
 
 GCC is distributed in the hope that it will be useful,
 any later version.
 
 GCC is distributed in the hope that it will be useful,
@@ -16,9 +17,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to
-the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA.  */
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
 
 
 #include "config.h"
 
 
 #include "config.h"
@@ -41,7 +41,8 @@ cxx_print_decl (FILE *file, tree node, int indent)
       return;
     }
 
       return;
     }
 
-  if (!DECL_LANG_SPECIFIC (node))
+  if (!CODE_CONTAINS_STRUCT (TREE_CODE (node), TS_DECL_COMMON)
+      || !DECL_LANG_SPECIFIC (node))
     return;
   indent_to (file, indent + 3);
   if (TREE_CODE (node) == FUNCTION_DECL
     return;
   indent_to (file, indent + 3);
   if (TREE_CODE (node) == FUNCTION_DECL
@@ -67,8 +68,7 @@ cxx_print_type (FILE *file, tree node, int indent)
     case TEMPLATE_TEMPLATE_PARM:
     case BOUND_TEMPLATE_TEMPLATE_PARM:
       indent_to (file, indent + 3);
     case TEMPLATE_TEMPLATE_PARM:
     case BOUND_TEMPLATE_TEMPLATE_PARM:
       indent_to (file, indent + 3);
-      fprintf (file, "index " HOST_WIDE_INT_PRINT_DEC " level "
-              HOST_WIDE_INT_PRINT_DEC " orig_level " HOST_WIDE_INT_PRINT_DEC,
+      fprintf (file, "index %d level %d orig_level %d",
               TEMPLATE_TYPE_IDX (node), TEMPLATE_TYPE_LEVEL (node),
               TEMPLATE_TYPE_ORIG_LEVEL (node));
       return;
               TEMPLATE_TYPE_IDX (node), TEMPLATE_TYPE_LEVEL (node),
               TEMPLATE_TYPE_ORIG_LEVEL (node));
       return;
@@ -168,14 +168,19 @@ cxx_print_xnode (FILE *file, tree node, int indent)
 {
   switch (TREE_CODE (node))
     {
 {
   switch (TREE_CODE (node))
     {
+    case BASELINK:
+      print_node (file, "functions", BASELINK_FUNCTIONS (node), indent + 4);
+      print_node (file, "binfo", BASELINK_BINFO (node), indent + 4);
+      print_node (file, "access_binfo", BASELINK_ACCESS_BINFO (node),
+                 indent + 4);
+      break;
     case OVERLOAD:
       print_node (file, "function", OVL_FUNCTION (node), indent+4);
       print_node (file, "chain", TREE_CHAIN (node), indent+4);
       break;
     case TEMPLATE_PARM_INDEX:
       indent_to (file, indent + 3);
     case OVERLOAD:
       print_node (file, "function", OVL_FUNCTION (node), indent+4);
       print_node (file, "chain", TREE_CHAIN (node), indent+4);
       break;
     case TEMPLATE_PARM_INDEX:
       indent_to (file, indent + 3);
-      fprintf (file, "index " HOST_WIDE_INT_PRINT_DEC " level "
-              HOST_WIDE_INT_PRINT_DEC " orig_level " HOST_WIDE_INT_PRINT_DEC,
+      fprintf (file, "index %d level %d orig_level %d",
               TEMPLATE_PARM_IDX (node), TEMPLATE_PARM_LEVEL (node),
               TEMPLATE_PARM_ORIG_LEVEL (node));
       break;
               TEMPLATE_PARM_IDX (node), TEMPLATE_PARM_LEVEL (node),
               TEMPLATE_PARM_ORIG_LEVEL (node));
       break;