OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / gcc / pretty-print.c
index 55bc3fe..af28387 100644 (file)
@@ -1,5 +1,6 @@
 /* Various declarations for language-independent pretty-print subroutines.
-   Copyright (C) 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010
+   Free Software Foundation, Inc.
    Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net>
 
 This file is part of GCC.
@@ -19,13 +20,10 @@ along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
-#undef FLOAT /* This is for hpux. They should change hpux.  */
-#undef FFS  /* Some systems define this in param.h.  */
 #include "system.h"
 #include "coretypes.h"
 #include "intl.h"
 #include "pretty-print.h"
-#include "tree.h"
 #include "ggc.h"
 
 #if HAVE_ICONV
@@ -190,9 +188,6 @@ pp_base_indent (pretty_printer *pp)
    %.*s: a substring the length of which is specified by an argument
         integer.
    %Ns: likewise, but length specified as constant in the format string.
-   %H: location_t.
-   %J: a decl tree, from which DECL_SOURCE_LOCATION will be recorded.
-   %K: a statement, from which EXPR_LOCATION and TREE_BLOCK will be recorded.
    Flag 'q': quote formatted text (must come immediately after '%').
 
    Arguments can be used sequentially, or through %N$ resp. *N$
@@ -235,7 +230,7 @@ pp_base_format (pretty_printer *pp, text_info *text)
      this point.  */
 
   memset (formatters, 0, sizeof formatters);
-  
+
   for (p = text->format_spec; *p; )
     {
       while (*p != '\0' && *p != '%')
@@ -251,7 +246,7 @@ pp_base_format (pretty_printer *pp, text_info *text)
        {
        case '\0':
          gcc_unreachable ();
-         
+
        case '%':
          obstack_1grow (&buffer->chunk_obstack, '%');
          p++;
@@ -368,7 +363,7 @@ pp_base_format (pretty_printer *pp, text_info *text)
   gcc_assert (chunk < PP_NL_ARGMAX * 2);
   args[chunk++] = XOBFINISH (&buffer->chunk_obstack, const char *);
   args[chunk] = 0;
-                 
+
   /* Set output to the argument obstack, and switch line-wrapping and
      prefixing off.  */
   buffer->obstack = &buffer->chunk_obstack;
@@ -476,51 +471,6 @@ pp_base_format (pretty_printer *pp, text_info *text)
              (pp, *text->args_ptr, precision, unsigned, "x");
          break;
 
-       case 'H':
-         {
-           location_t *locus = va_arg (*text->args_ptr, location_t *);
-           gcc_assert (text->locus != NULL);
-           *text->locus = *locus;
-         }
-         break;
-
-       case 'J':
-         {
-           tree t = va_arg (*text->args_ptr, tree);
-           gcc_assert (text->locus != NULL);
-           *text->locus = DECL_SOURCE_LOCATION (t);
-         }
-         break;
-
-       case 'K':
-         {
-           tree t = va_arg (*text->args_ptr, tree), block;
-           gcc_assert (text->locus != NULL);
-           *text->locus = EXPR_LOCATION (t);
-           gcc_assert (text->abstract_origin != NULL);
-           block = TREE_BLOCK (t);
-           *text->abstract_origin = NULL;
-           while (block
-                  && TREE_CODE (block) == BLOCK
-                  && BLOCK_ABSTRACT_ORIGIN (block))
-             {
-               tree ao = BLOCK_ABSTRACT_ORIGIN (block);
-
-               while (TREE_CODE (ao) == BLOCK
-                      && BLOCK_ABSTRACT_ORIGIN (ao)
-                      && BLOCK_ABSTRACT_ORIGIN (ao) != ao)
-                 ao = BLOCK_ABSTRACT_ORIGIN (ao);
-
-               if (TREE_CODE (ao) == FUNCTION_DECL)
-                 {
-                   *text->abstract_origin = block;
-                   break;
-                 }
-               block = BLOCK_SUPERCONTEXT (block);
-             }
-         }
-         break;
-
        case '.':
          {
            int n;
@@ -850,21 +800,6 @@ pp_base_maybe_space (pretty_printer *pp)
       pp_base (pp)->padding = pp_none;
     }
 }
-
-/* Print the identifier ID to PRETTY-PRINTER.  */
-
-void
-pp_base_tree_identifier (pretty_printer *pp, tree id)
-{
-  if (pp_translate_identifiers (pp))
-    {
-      const char *text = identifier_to_locale (IDENTIFIER_POINTER (id));
-      pp_append_text (pp, text, text + strlen (text));
-    }
-  else
-    pp_append_text (pp, IDENTIFIER_POINTER (id),
-                   IDENTIFIER_POINTER (id) + IDENTIFIER_LENGTH (id));
-}
 \f
 /* The string starting at P has LEN (at least 1) bytes left; if they
    start with a valid UTF-8 sequence, return the length of that