diff options
author | gdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-08-05 04:00:57 +0000 |
---|---|---|
committer | gdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-08-05 04:00:57 +0000 |
commit | a94db6b0a116d260b158bae8122eb4d7815f3451 (patch) | |
tree | 2a3052c426aacb44697e1d70381e8bd33a240377 /gcc/pretty-print.c | |
parent | a1622d9af9b63eb9a6fb061fc3e35b3480060007 (diff) | |
download | gcc-a94db6b0a116d260b158bae8122eb4d7815f3451.tar.gz |
* pretty-print.h (pp_base): Remove. Adjust dependent macros.
* diagnostic.h (diagnostic_flush_buffer): Adjust.
* pretty-print.c (pp_formatted_text_data): Likewise.
(pp_indent): Rename from pp_base_indent.
(pp_format): Rename from pp_base_format.
(pp_output_formatted_text): Rename from pp_base_output_formatted_text.
(pp_format_verbatim): Rename from pp_base_format_verbatim.
(pp_flush): Rename from pp_base_flush.
(pp_set_line_maximum_length): Rename from
pp_base_set_line_maximum_length.
(pp_clear_output_area): Rename from pp_base_clear_output_area.
(pp_set_prefix): Rename from pp_base_set_prefix.
(pp_destroy_prefix): Rename from pp_base_destroy_prefix.
(pp_emit_prefix): Rename from pp_base_emit_prefix.
(pp_append_text): Rename from pp_base_append_text.
(pp_formatted_text): Rename from pp_base_formatted_text.
(pp_last_position_in_text): Rename from pp_base_last_position_in_text.
(pp_remaining_character_count_for_line): Rename from
pp_base_remaining_character_count_for_line.
(pp_newline): Rename from pp_base_newline.
(pp_character): Rename from pp_base_character.
(pp_string): Rename from pp_base_string.
(pp_maybe_space): Rename from pp_base_maybe_space.
* asan.c (asan_pp_string): Adjust.
(asan_emit_stack_protection): Likewise.
(asan_add_global): Likewise.
* sched-vis.c (str_pattern_slim): Adjust pretty printer function call.
* tree-mudflap.c (mf_varname_tree): Likewise.
* tree-pretty-print.c (pp_tree_identifier): Rename from
pp_base_tree_identifier.
* tree-pretty-print.h (pp_tree_identifier): Remove macro definition.
Declare as function.
c/
* c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
c-family/
* c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
(pp_base): Remove.
(pp_c_base): Likewise. Adjust users.
* c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
(pp_c_whitespace): Do not call pp_base.
(pp_c_left_paren): Likewise.
(pp_c_right_paren): Likewise.
(pp_c_left_brace): Likewise.
(pp_c_right_brace): Likewise.
(pp_c_left_bracket): Likewise.
(pp_c_right_bracket): Likewise.
(pp_c_dot): Likewise.
(pp_c_ampersand): Likewise.
(pp_c_star): Likewise.
(pp_c_arrow): Likewise.
(pp_c_semicolon): Likewise.
(pp_c_complement): Likewise.
(pp_c_exclamation): Likewise.
(pp_c_direct_declarator): Likewise.
(pp_c_ws_string): Likewise.
(pp_c_identifier): Likewise.
(pp_c_statement): Likewise.
(print_c_tree): Likewise.
cp/
* cxx-pretty-print.h (pp_c_base): Remove.
(cxx_pretty_printer): Derive from c_pretty_printer.
Adjust macros using pp_c_base.
* cp-objcp-common.c (cxx_initialize_diagnostics): Do not call pp_base.
* cxx-pretty-print.c (pp_cxx_nonconsecutive_character): Likewise.
(pp_cxx_colon_colon): Likewise.
(pp_cxx_separate_with): Likewise.
(pp_cxx_storage_class_specifier): Do not call pp_c_base.
(pp_cxx_expression_list): Likewise.
(pp_cxx_space_for_pointer_operator): Likewise.
(pp_cxx_init_declarator): Likewise.
(pp_cxx_call_argument_list): Likewise.
(pp_cxx_constant): Likewise.
(pp_cxx_postfix_expression): Likewise.
(pp_cxx_new_expression): Likewise.
(pp_cxx_unary_expression): Likewise.
(pp_cxx_cast_expression): Likewise.
(pp_cxx_conditional_expression): Likewise.
(pp_cxx_assignment_expression): Likewise.
(pp_cxx_expression): Likewise.
(pp_cxx_function_specifier): Likewise.
(pp_cxx_decl_specifier_seq): Likewise.
(pp_cxx_simple_type_specifier): Likewise.
(pp_cxx_type_specifier_seq): Likewise.
(pp_cxx_ptr_operator): Likewise.
(pp_cxx_parameter_declaration_clause): Likewise.
(pp_cxx_direct_declarator): Likewise.
(pp_cxx_direct_abstract_declarator): Likewise.
(pp_cxx_type_id): Likewise.
(pp_cxx_statement): Likewise.
(pp_cxx_pretty_printer_init): Tidy.
* error.c (init_error): Do not use pp_base.
(dump_aggr_type): Likewise.
(dump_type_prefix): Likewise.
(dump_type_suffix): Likewise.
(dump_global_iord): Likewise.
(dump_decl): Likewise.
(dump_function_decl): Likewise.
(dump_ref_qualifier): Likewise.
(reinit_cxx_pp): Likewise.
(decl_as_dwarf_string): Likewise.
(lang_decl_dwarf_name): Likewise.
(type_to_string): Likewise.
(cv_to_string): Likewise.
(cxx_print_error_function): Likewise.
(cp_diagnostic_starter): Likewise.
(cp_diagnostic_finalizer): Likewise.
(cp_print_error_function): Likewise.
(print_instantiation_context): Likewise.
(cp_printer): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201479 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/pretty-print.c')
-rw-r--r-- | gcc/pretty-print.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/gcc/pretty-print.c b/gcc/pretty-print.c index fe46464538e..27fd0d18b1d 100644 --- a/gcc/pretty-print.c +++ b/gcc/pretty-print.c @@ -31,7 +31,7 @@ along with GCC; see the file COPYING3. If not see /* A pointer to the formatted diagnostic message. */ #define pp_formatted_text_data(PP) \ - ((const char *) obstack_base (pp_base (PP)->buffer->obstack)) + ((const char *) obstack_base ((PP)->buffer->obstack)) /* Format an integer given by va_arg (ARG, type-specifier T) where type-specifier is a precision modifier as indicated by PREC. F is @@ -207,7 +207,7 @@ pp_append_r (pretty_printer *pp, const char *start, int length) the column position to the current indentation level, assuming that a newline has just been written to the buffer. */ void -pp_base_indent (pretty_printer *pp) +pp_indent (pretty_printer *pp) { int n = pp_indentation (pp); int i; @@ -252,10 +252,10 @@ pp_base_indent (pretty_printer *pp) /* Formatting phases 1 and 2: render TEXT->format_spec plus TEXT->args_ptr into a series of chunks in PP->buffer->args[]. - Phase 3 is in pp_base_format_text. */ + Phase 3 is in pp_format_text. */ void -pp_base_format (pretty_printer *pp, text_info *text) +pp_format (pretty_printer *pp, text_info *text) { output_buffer *buffer = pp->buffer; const char *p; @@ -617,7 +617,7 @@ pp_base_format (pretty_printer *pp, text_info *text) /* Format of a message pointed to by TEXT. */ void -pp_base_output_formatted_text (pretty_printer *pp) +pp_output_formatted_text (pretty_printer *pp) { unsigned int chunk; output_buffer *buffer = pp_buffer (pp); @@ -627,7 +627,7 @@ pp_base_output_formatted_text (pretty_printer *pp) gcc_assert (buffer->obstack == &buffer->formatted_obstack); gcc_assert (buffer->line_length == 0); - /* This is a third phase, first 2 phases done in pp_base_format_args. + /* This is a third phase, first 2 phases done in pp_format_args. Now we actually print it. */ for (chunk = 0; args[chunk]; chunk++) pp_string (pp, args[chunk]); @@ -641,7 +641,7 @@ pp_base_output_formatted_text (pretty_printer *pp) /* Helper subroutine of output_verbatim and verbatim. Do the appropriate settings needed by BUFFER for a verbatim formatting. */ void -pp_base_format_verbatim (pretty_printer *pp, text_info *text) +pp_format_verbatim (pretty_printer *pp, text_info *text) { /* Set verbatim mode. */ pp_wrapping_mode_t oldmode = pp_set_verbatim_wrapping (pp); @@ -656,7 +656,7 @@ pp_base_format_verbatim (pretty_printer *pp, text_info *text) /* Flush the content of BUFFER onto the attached stream. */ void -pp_base_flush (pretty_printer *pp) +pp_flush (pretty_printer *pp) { pp_write_text_to_stream (pp); pp_clear_state (pp); @@ -667,7 +667,7 @@ pp_base_flush (pretty_printer *pp) output in line-wrapping mode. A LENGTH value 0 suppresses line-wrapping. */ void -pp_base_set_line_maximum_length (pretty_printer *pp, int length) +pp_set_line_maximum_length (pretty_printer *pp, int length) { pp_line_cutoff (pp) = length; pp_set_real_maximum_length (pp); @@ -675,7 +675,7 @@ pp_base_set_line_maximum_length (pretty_printer *pp, int length) /* Clear PRETTY-PRINTER output area text info. */ void -pp_base_clear_output_area (pretty_printer *pp) +pp_clear_output_area (pretty_printer *pp) { obstack_free (pp->buffer->obstack, obstack_base (pp->buffer->obstack)); pp->buffer->line_length = 0; @@ -683,7 +683,7 @@ pp_base_clear_output_area (pretty_printer *pp) /* Set PREFIX for PRETTY-PRINTER. */ void -pp_base_set_prefix (pretty_printer *pp, const char *prefix) +pp_set_prefix (pretty_printer *pp, const char *prefix) { pp->prefix = prefix; pp_set_real_maximum_length (pp); @@ -693,7 +693,7 @@ pp_base_set_prefix (pretty_printer *pp, const char *prefix) /* Free PRETTY-PRINTER's prefix, a previously malloc()'d string. */ void -pp_base_destroy_prefix (pretty_printer *pp) +pp_destroy_prefix (pretty_printer *pp) { if (pp->prefix != NULL) { @@ -704,7 +704,7 @@ pp_base_destroy_prefix (pretty_printer *pp) /* Write out PRETTY-PRINTER's prefix. */ void -pp_base_emit_prefix (pretty_printer *pp) +pp_emit_prefix (pretty_printer *pp) { if (pp->prefix != NULL) { @@ -717,7 +717,7 @@ pp_base_emit_prefix (pretty_printer *pp) case DIAGNOSTICS_SHOW_PREFIX_ONCE: if (pp->emitted_prefix) { - pp_base_indent (pp); + pp_indent (pp); break; } pp_indentation (pp) += 3; @@ -757,7 +757,7 @@ pp_construct (pretty_printer *pp, const char *prefix, int maximum_length) whitespace if appropriate. The caller must ensure that it is safe to do so. */ void -pp_base_append_text (pretty_printer *pp, const char *start, const char *end) +pp_append_text (pretty_printer *pp, const char *start, const char *end) { /* Emit prefix and skip whitespace if we're starting a new line. */ if (pp->buffer->line_length == 0) @@ -773,7 +773,7 @@ pp_base_append_text (pretty_printer *pp, const char *start, const char *end) /* Finishes constructing a NULL-terminated character string representing the PRETTY-PRINTED text. */ const char * -pp_base_formatted_text (pretty_printer *pp) +pp_formatted_text (pretty_printer *pp) { obstack_1grow (pp->buffer->obstack, '\0'); return pp_formatted_text_data (pp); @@ -782,7 +782,7 @@ pp_base_formatted_text (pretty_printer *pp) /* Return a pointer to the last character emitted in PRETTY-PRINTER's output area. A NULL pointer means no character available. */ const char * -pp_base_last_position_in_text (const pretty_printer *pp) +pp_last_position_in_text (const pretty_printer *pp) { const char *p = NULL; struct obstack *text = pp->buffer->obstack; @@ -795,7 +795,7 @@ pp_base_last_position_in_text (const pretty_printer *pp) /* Return the amount of characters PRETTY-PRINTER can accept to make a full line. Meaningful only in line-wrapping mode. */ int -pp_base_remaining_character_count_for_line (pretty_printer *pp) +pp_remaining_character_count_for_line (pretty_printer *pp) { return pp->maximum_length - pp->buffer->line_length; } @@ -839,7 +839,7 @@ pp_verbatim (pretty_printer *pp, const char *msg, ...) /* Have PRETTY-PRINTER start a new line. */ void -pp_base_newline (pretty_printer *pp) +pp_newline (pretty_printer *pp) { obstack_1grow (pp->buffer->obstack, '\n'); pp_needs_newline (pp) = false; @@ -848,7 +848,7 @@ pp_base_newline (pretty_printer *pp) /* Have PRETTY-PRINTER add a CHARACTER. */ void -pp_base_character (pretty_printer *pp, int c) +pp_character (pretty_printer *pp, int c) { if (pp_is_wrapping_line (pp) && pp_remaining_character_count_for_line (pp) <= 0) @@ -864,7 +864,7 @@ pp_base_character (pretty_printer *pp, int c) /* Append a STRING to the output area of PRETTY-PRINTER; the STRING may be line-wrapped if in appropriate mode. */ void -pp_base_string (pretty_printer *pp, const char *str) +pp_string (pretty_printer *pp, const char *str) { pp_maybe_wrap_text (pp, str, str + (str ? strlen (str) : 0)); } @@ -872,12 +872,12 @@ pp_base_string (pretty_printer *pp, const char *str) /* Maybe print out a whitespace if needed. */ void -pp_base_maybe_space (pretty_printer *pp) +pp_maybe_space (pretty_printer *pp) { - if (pp_base (pp)->padding != pp_none) + if (pp->padding != pp_none) { pp_space (pp); - pp_base (pp)->padding = pp_none; + pp->padding = pp_none; } } |