GCC Middle and Back End API Reference
|
Go to the source code of this file.
Data Structures | |
struct | text_info |
class | output_buffer |
struct | pp_wrapping_mode_t |
class | format_postprocessor |
class | token_printer |
class | pretty_printer |
Namespaces | |
namespace | pp_markup |
Macros | |
#define | PP_NL_ARGMAX 30 |
#define | pp_is_wrapping_line(PP) |
#define | pp_space(PP) |
#define | pp_left_paren(PP) |
#define | pp_right_paren(PP) |
#define | pp_left_bracket(PP) |
#define | pp_right_bracket(PP) |
#define | pp_left_brace(PP) |
#define | pp_right_brace(PP) |
#define | pp_semicolon(PP) |
#define | pp_comma(PP) |
#define | pp_dot(PP) |
#define | pp_colon(PP) |
#define | pp_colon_colon(PP) |
#define | pp_arrow(PP) |
#define | pp_equal(PP) |
#define | pp_question(PP) |
#define | pp_bar(PP) |
#define | pp_bar_bar(PP) |
#define | pp_carret(PP) |
#define | pp_ampersand(PP) |
#define | pp_ampersand_ampersand(PP) |
#define | pp_less(PP) |
#define | pp_less_equal(PP) |
#define | pp_greater(PP) |
#define | pp_greater_equal(PP) |
#define | pp_plus(PP) |
#define | pp_minus(PP) |
#define | pp_star(PP) |
#define | pp_slash(PP) |
#define | pp_modulo(PP) |
#define | pp_exclamation(PP) |
#define | pp_complement(PP) |
#define | pp_quote(PP) |
#define | pp_backquote(PP) |
#define | pp_doublequote(PP) |
#define | pp_underscore(PP) |
#define | pp_maybe_newline_and_indent(PP, N) |
#define | pp_scalar(PP, FORMAT, SCALAR) |
#define | pp_decimal_int(PP, I) |
#define | pp_unsigned_wide_integer(PP, I) |
#define | pp_vrange(PP, R) |
#define | pp_double(PP, F) |
#define | pp_pointer(PP, P) |
#define | pp_identifier(PP, ID) |
#define | GCC_PPDIAG_STYLE __gcc_diag__ |
#define | ATTRIBUTE_GCC_PPDIAG(m, n) |
Typedefs | |
typedef unsigned int | pp_flags |
typedef bool(* | printer_fn) (pretty_printer *, text_info *, const char *, int, bool, bool, bool, bool *, pp_token_list &) |
Enumerations | |
enum | diagnostic_prefixing_rule_t { DIAGNOSTICS_SHOW_PREFIX_ONCE = 0x0 , DIAGNOSTICS_SHOW_PREFIX_NEVER = 0x1 , DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE = 0x2 } |
enum | pp_padding { pp_none , pp_before , pp_after } |
Variables | |
void *(* | identifier_to_locale_alloc )(size_t) |
void(* | identifier_to_locale_free )(void *) |
#define ATTRIBUTE_GCC_PPDIAG | ( | m, | |
n ) |
This header may be included before diagnostics-core.h, hence the duplicate definitions to allow for GCC-specific formats.
#define GCC_PPDIAG_STYLE __gcc_diag__ |
If we haven't already defined a front-end-specific diagnostics style, use the generic one.
#define pp_ampersand | ( | PP | ) |
#define pp_ampersand_ampersand | ( | PP | ) |
#define pp_arrow | ( | PP | ) |
Referenced by dump_generic_node().
#define pp_backquote | ( | PP | ) |
#define pp_bar | ( | PP | ) |
Referenced by gimple_dump_bb_for_graph(), and rtl_dump_bb_for_graph().
#define pp_bar_bar | ( | PP | ) |
#define pp_carret | ( | PP | ) |
#define pp_colon | ( | PP | ) |
Referenced by dump_array_domain(), dump_generic_node(), dump_gimple_label(), dump_location(), dump_omp_clause(), dump_omp_iterators(), and lhd_print_error_function().
#define pp_colon_colon | ( | PP | ) |
Referenced by dump_generic_node().
#define pp_comma | ( | PP | ) |
Referenced by dump_function_declaration(), dump_generic_node(), dump_gimple_omp_continue(), dump_omp_clause(), dump_omp_context_selector(), format_phase_2(), lhd_print_error_function(), pp_wide_integer(), and print_exp().
#define pp_complement | ( | PP | ) |
Referenced by dump_unary_rhs().
#define pp_decimal_int | ( | PP, | |
I ) |
Referenced by asan_emit_stack_protection(), default_token_printer(), dump_block_node(), dump_decl_name(), dump_generic_node(), dump_gimple_fmt(), dump_gimple_phi(), dump_location(), dump_mem_ref(), dump_ternary_rhs(), pp_cfg_jump(), pp_points_to_solution(), print_exp(), sarif_builder::sarif_token_printer::print_tokens(), and simd_clone_mangle().
#define pp_dot | ( | PP | ) |
Referenced by dump_generic_node(), and dump_gimple_call().
#define pp_double | ( | PP, | |
F ) |
Referenced by format_phase_2().
#define pp_doublequote | ( | PP | ) |
#define pp_equal | ( | PP | ) |
Referenced by dump_generic_node(), dump_gimple_assign(), dump_gimple_omp_atomic_load(), dump_omp_iterators(), print_declaration(), and print_pattern().
#define pp_exclamation | ( | PP | ) |
Referenced by dump_unary_rhs(), and print_pattern().
#define pp_greater | ( | PP | ) |
Referenced by dump_binary_rhs(), dump_generic_node(), dump_gimple_asm(), dump_gimple_bind(), dump_gimple_call(), dump_gimple_mem_ops(), dump_gimple_omp_for(), dump_gimple_omp_sections(), dump_gimple_phi(), dump_gimple_switch(), dump_mem_ref(), dump_ternary_rhs(), dump_unary_rhs(), pp_cfg_jump(), and print_value().
#define pp_greater_equal | ( | PP | ) |
Referenced by dump_gimple_omp_for().
#define pp_identifier | ( | PP, | |
ID ) |
Referenced by default_tree_printer().
#define pp_is_wrapping_line | ( | PP | ) |
True if PRETTY-PRINTER is in line-wrapping mode.
Referenced by escaped_string::escape(), pp_append_text(), pp_character(), pp_maybe_wrap_text(), pp_wrap_text(), and pretty_printer::set_real_maximum_length().
#define pp_left_brace | ( | PP | ) |
Referenced by draw_cfg_node(), dump_generic_node(), dump_gimple_assume(), dump_gimple_bind(), dump_gimple_omp_block(), dump_gimple_omp_critical(), dump_gimple_omp_dispatch(), dump_gimple_omp_for(), dump_gimple_omp_masked(), dump_gimple_omp_ordered(), dump_gimple_omp_parallel(), dump_gimple_omp_scan(), dump_gimple_omp_scope(), dump_gimple_omp_sections(), dump_gimple_omp_single(), dump_gimple_omp_target(), dump_gimple_omp_task(), dump_gimple_omp_taskgroup(), dump_gimple_transaction(), dump_gimple_try(), print_insn(), print_pattern(), and print_struct_decl().
#define pp_left_bracket | ( | PP | ) |
Referenced by dump_array_domain(), dump_generic_node(), dump_location(), dump_unary_rhs(), pp_wide_integer(), print_exp(), print_value(), and ubsan_type_descriptor().
#define pp_left_paren | ( | PP | ) |
Referenced by dump_binary_rhs(), dump_function_declaration(), dump_generic_node(), dump_gimple_omp_atomic_store(), dump_gimple_phi(), dump_mem_ref(), dump_omp_clause(), dump_omp_loop_non_rect_expr(), dump_unary_rhs(), print_call_name(), print_declaration(), print_exp(), and print_pattern().
#define pp_less | ( | PP | ) |
Referenced by dump_gimple_omp_for().
#define pp_less_equal | ( | PP | ) |
Referenced by dump_gimple_omp_for().
#define pp_maybe_newline_and_indent | ( | PP, | |
N ) |
#define pp_minus | ( | PP | ) |
Referenced by dump_generic_node(), dump_omp_clause(), dump_unary_rhs(), and pp_double_int().
#define pp_modulo | ( | PP | ) |
Referenced by print_value().
#define PP_NL_ARGMAX 30 |
Various declarations for language-independent pretty-print subroutines. Copyright (C) 2002-2024 Free Software Foundation, Inc. Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net> 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 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 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 along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
Maximum number of format string arguments.
Referenced by pretty_printer::format(), format_phase_1(), and format_phase_2().
#define pp_plus | ( | PP | ) |
Referenced by dump_omp_clause().
#define pp_pointer | ( | PP, | |
P ) |
Referenced by format_phase_2(), and optrecord_json_writer::get_id_value_for_pass().
#define pp_question | ( | PP | ) |
Referenced by dump_generic_node().
#define pp_quote | ( | PP | ) |
Referenced by ubsan_type_descriptor().
#define pp_right_brace | ( | PP | ) |
Referenced by draw_cfg_node(), dump_generic_node(), dump_gimple_assume(), dump_gimple_bind(), dump_gimple_omp_block(), dump_gimple_omp_critical(), dump_gimple_omp_dispatch(), dump_gimple_omp_for(), dump_gimple_omp_masked(), dump_gimple_omp_ordered(), dump_gimple_omp_parallel(), dump_gimple_omp_scan(), dump_gimple_omp_scope(), dump_gimple_omp_sections(), dump_gimple_omp_single(), dump_gimple_omp_target(), dump_gimple_omp_task(), dump_gimple_omp_taskgroup(), dump_gimple_transaction(), dump_gimple_try(), pp_points_to_solution(), print_insn(), print_pattern(), and print_struct_decl().
#define pp_right_bracket | ( | PP | ) |
Referenced by dump_array_domain(), dump_generic_node(), dump_gimple_call(), dump_gimple_transaction(), dump_mem_ref(), dump_omp_clause(), pp_wide_integer(), print_declaration(), print_value(), and ubsan_type_descriptor().
#define pp_right_paren | ( | PP | ) |
Referenced by dump_binary_rhs(), dump_function_declaration(), dump_generic_node(), dump_gimple_call(), dump_gimple_cond(), dump_gimple_omp_atomic_store(), dump_gimple_omp_continue(), dump_gimple_omp_critical(), dump_gimple_omp_for(), dump_gimple_phi(), dump_mem_ref(), dump_omp_clause(), dump_omp_init_prefer_type(), dump_omp_iterators(), dump_omp_loop_non_rect_expr(), dump_ternary_rhs(), dump_unary_rhs(), print_declaration(), print_exp(), and print_value().
#define pp_scalar | ( | PP, | |
FORMAT, | |||
SCALAR ) |
Referenced by dump_block_node(), dump_decl_name(), dump_edge_probability(), dump_function_name(), dump_generic_node(), dump_gimple_fmt(), format_phase_2(), and print_value().
#define pp_semicolon | ( | PP | ) |
Referenced by dump_generic_node(), dump_gimple_assign(), dump_gimple_call(), dump_gimple_cond(), dump_gimple_return(), pp_cfg_jump(), print_declaration(), and print_pattern().
#define pp_slash | ( | PP | ) |
#define pp_space | ( | PP | ) |
Referenced by gcc_rich_location::add_fixit_insert_formatted(), asan_emit_stack_protection(), diagnostic_text_output_format::build_indent_prefix(), dump_binary_rhs(), dump_block_node(), dump_function_declaration(), dump_generic_node(), dump_gimple_assign(), dump_gimple_call(), dump_gimple_cond(), dump_gimple_omp_atomic_load(), dump_gimple_omp_atomic_store(), dump_gimple_omp_continue(), dump_gimple_omp_for(), dump_gimple_return(), dump_gimple_switch(), dump_omp_clause(), dump_omp_clauses(), dump_omp_context_selector(), dump_omp_iterators(), format_phase_2(), pretty_printer::maybe_space(), pp_indent(), pp_points_to_solution(), pp_separate_with(), pp_wrap_text(), json::array::print(), json::object::print(), print_declaration(), print_generic_stmt_indented(), ana::format::spacer(), ubsan_type_descriptor(), and graphviz_out::write_indent().
#define pp_star | ( | PP | ) |
Referenced by dump_gimple_omp_atomic_load(), dump_mem_ref(), and ubsan_type_descriptor().
#define pp_underscore | ( | PP | ) |
Referenced by dump_generic_node(), and simd_clone_mangle().
#define pp_unsigned_wide_integer | ( | PP, | |
I ) |
Referenced by dump_generic_node(), dump_mem_ref(), pp_double_int(), simd_clone_mangle(), and ubsan_type_descriptor().
#define pp_vrange | ( | PP, | |
R ) |
Referenced by dump_ssaname_info().
typedef unsigned int pp_flags |
The type of pretty-printer flags passed to clients.
typedef bool(* printer_fn) (pretty_printer *, text_info *, const char *, int, bool, bool, bool, bool *, pp_token_list &) |
The type of a hook that formats client-specific data onto a pretty_printer. A client-supplied formatter returns true if everything goes well, otherwise it returns false.
How often diagnostics are prefixed by their locations: o DIAGNOSTICS_SHOW_PREFIX_NEVER: never - not yet supported; o DIAGNOSTICS_SHOW_PREFIX_ONCE: emit only once; o DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE: emit each time a physical line is started.
Enumerator | |
---|---|
DIAGNOSTICS_SHOW_PREFIX_ONCE | |
DIAGNOSTICS_SHOW_PREFIX_NEVER | |
DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE |
enum pp_padding |
|
extern |
Given IDENT, an identifier in the internal encoding, return a version of IDENT suitable for diagnostics in the locale character set: either IDENT itself, or a string, allocated using identifier_to_locale_alloc, converted to the locale character set and using escape sequences if not representable in the locale character set or containing control characters or invalid byte sequences. Existing backslashes in IDENT are not doubled, so the result may not uniquely specify the contents of an arbitrary byte sequence identifier.
References cd, CONST_CAST, decode_utf8_char(), errno, i, identifier_to_locale_alloc, identifier_to_locale_free, locale_encoding, locale_utf8, and NULL.
Referenced by announce_function(), default_tree_printer(), dump_fancy_name(), expand_expr_real_1(), compiler_logical_location::get_name_for_tree_for_path_output(), compiler_logical_location::get_name_with_scope_for_tree(), compiler_logical_location::get_short_name_for_tree(), lhd_print_error_function(), pp_tree_identifier(), resolve_operand_name_1(), symtab_node::verify_base(), and cgraph_node::verify_node().
|
inline |
Append to the output buffer a string specified by its STARTing character and LENGTH.
References gcc_checking_assert, i, output_buffer::m_line_length, and output_buffer::m_obstack.
Referenced by diagnostic_text_format_buffer::move_to(), and pp_append_r().
|
inline |
Finishes constructing a NULL-terminated character string representing the buffered text.
References output_buffer::m_obstack.
Referenced by diagnostic_text_format_buffer::move_to(), and pp_formatted_text().
|
inline |
Return a pointer to the last character emitted in the output_buffer. A NULL pointer means no character available.
References output_buffer::m_obstack, NULL, and obstack.
Referenced by dump_pretty_printer::custom_token_printer::emit_any_pending_textual_chunks(), diagnostic_text_format_buffer::empty_p(), and pp_last_position_in_text().
|
extern |
Append a string delimited by START and END to the output area of PRETTY-PRINTER. No line wrapping is done. However, if beginning a new line then emit PRETTY-PRINTER's prefix and skip any leading whitespace if appropriate. The caller must ensure that it is safe to do so.
References pretty_printer::emit_prefix(), end(), pp_append_r(), pp_buffer(), and pp_is_wrapping_line.
Referenced by dump_fancy_name(), format_phase_2(), pp_maybe_wrap_text(), pp_tree_identifier(), and pp_wrap_text().
|
extern |
Add a localized open quote, and if SHOW_COLOR is true, begin colorizing using the "quote" color.
References colorize_start(), open_quote, and pp_string().
Referenced by default_token_printer(), dump_pretty_printer::custom_token_printer::print_tokens(), and sarif_builder::sarif_token_printer::print_tokens().
|
inline |
|
inline |
|
inline |
Referenced by diagnostic_text_format_buffer::clear(), diagnostic_set_caret_max_width(), json::value::dump(), dump_generic_node(), diagnostic_text_format_buffer::flush(), gimple_dump_bb_buff(), pp_append_r(), pp_append_text(), pp_character(), pp_clear_output_area(), pp_double_int(), pp_flush(), pp_formatted_text(), pp_last_position_in_text(), pp_newline(), pp_really_flush(), pp_write_text_as_dot_label_to_stream(), pp_write_text_as_html_like_dot_to_stream(), pp_write_text_to_stream(), and diagnostic_text_output_format::set_buffer().
|
extern |
Have PRETTY-PRINTER add a CHARACTER.
References output_buffer::m_line_length, pp_buffer(), pp_is_wrapping_line, pp_newline(), and pretty_printer::remaining_character_count_for_line().
Referenced by default_token_printer(), dump_binary_rhs(), dump_block_node(), dump_decl_name(), dump_function_name(), dump_generic_node(), dump_gimple_fmt(), dump_gimple_omp_return(), dump_gimple_omp_teams(), dump_loc(), dump_omp_clause(), dump_omp_init_prefer_type(), dump_ternary_rhs(), diagnostic_event::meaning::dump_to_pp(), format_phase_2(), make_item_for_dump_dec(), diagnostic_text_sink::on_begin_text_diagnostic(), pp_separate_with(), pretty_print_string(), json::array::print(), json::object::print(), diagnostic_text_output_format::print_any_cwe(), diagnostic_text_output_format::print_any_rules(), edited_file::print_content(), print_diff_line(), print_escaped_json_string(), print_escaped_string(), diagnostic_text_output_format::print_option_information(), sarif_builder::sarif_token_printer::print_tokens(), sarif_begin_embedded_link(), sarif_end_embedded_link(), simd_clone_mangle(), vrange_printer::visit(), vrange_printer::visit(), and vrange_printer::visit().
|
extern |
Clear PRETTY-PRINTER output area text info.
References output_buffer::m_line_length, and pp_buffer().
Referenced by simple_diagnostic_path::add_event(), simple_diagnostic_path::add_thread_event(), diagnostic_text_format_buffer::clear(), sarif_builder::make_message_object_for_diagram(), sarif_builder::make_result_object(), sarif_result::on_nested_diagnostic(), json_output_format::on_report_diagnostic(), pp_write_text_as_dot_label_to_stream(), pp_write_text_as_html_like_dot_to_stream(), pp_write_text_to_stream(), and sarif_ice_notification::sarif_ice_notification().
|
extern |
Free PRETTY-PRINTER's prefix, a previously malloc()'d string.
Referenced by diagnostic_text_output_format::append_note().
|
inline |
|
extern |
If SHOW_COLOR is true, stop colorizing. Add a localized close quote.
References close_quote, colorize_stop(), and pp_string().
Referenced by default_token_printer(), dump_pretty_printer::custom_token_printer::print_tokens(), and sarif_builder::sarif_token_printer::print_tokens().
|
inline |
|
extern |
Flush the content of BUFFER onto the attached stream. This function does nothing unless pp->output_buffer->flush_p.
References pretty_printer::clear_state(), pp_buffer(), and pp_write_text_to_stream().
Referenced by default_diagnostic_text_finalizer(), dot_rdg_1(), draw_cfg_edges(), draw_cfg_node(), draw_cfg_node_succ_edges(), ana::one_way_id_map< T >::dump(), irange_bitmask::dump(), json::value::dump(), vrange::dump(), digraph< GraphTraits >::dump_dot_to_file(), dump_insn_slim(), dump_rtl_slim(), dump_ssaname_info_to_file(), dump_value_slim(), gimple_dump_bb_buff(), toplev::main(), diagnostic_text_output_format::on_diagram(), pp_newline_and_flush(), print_generic_expr(), print_gimple_expr(), print_graph_cfg(), print_node(), print_omp_context_selector(), diagnostic_text_output_format::print_path(), diagnostic_context::report_diagnostic(), start_graph_dump(), diagnostic_manager::write_patch(), and tree_dump_pretty_printer::~tree_dump_pretty_printer().
|
inline |
Referenced by simple_diagnostic_path::add_event(), simple_diagnostic_path::add_thread_event(), diagnostic_text_output_format::append_note(), dump_context::dump_printf_va(), libgdiagnostics_path_event::make_desc(), opt_problem::opt_problem(), pp_format_verbatim(), pp_printf(), pp_printf_n(), graphviz_out::print(), graphviz_out::println(), and diagnostic_context::report_diagnostic().
|
inline |
|
inline |
|
extern |
Helper subroutine of output_verbatim and verbatim. Do the appropriate settings needed by BUFFER for a verbatim formatting.
References pp_format(), pp_output_formatted_text(), pp_set_verbatim_wrapping(), and pp_wrapping_mode().
Referenced by diagnostic_text_output_format::on_report_verbatim(), and pp_verbatim().
|
extern |
Finishes constructing a NULL-terminated character string representing the PRETTY-PRINTED text.
References output_buffer_formatted_text(), and pp_buffer().
Referenced by simple_diagnostic_path::add_event(), gcc_rich_location::add_fixit_insert_formatted(), simple_diagnostic_path::add_thread_event(), element_event_desc::add_to_phase_2(), def_walker< reverse >::addr_reg_conflict_p(), attr_access::array_as_string(), asan_pp_string(), dump_context::begin_scope(), diagnostic_text_output_format::build_indent_prefix(), dump_pretty_printer::custom_token_printer::emit_any_pending_textual_chunks(), fixup_debug_use(), edit_context::generate_diff(), generate_results(), edited_file::get_content(), diagnostic_event::get_desc(), optrecord_json_writer::get_id_value_for_pass(), libgdiagnostics_path_event::make_desc(), make_item_for_dump_dec(), make_item_for_dump_generic_expr(), make_item_for_dump_gimple_expr(), make_item_for_dump_gimple_stmt(), make_json_for_path(), sarif_builder::make_location_object(), sarif_builder::make_location_object(), sarif_builder::make_message_object_for_diagram(), sarif_builder::make_reporting_descriptor_object_for_cwe_id(), sarif_builder::make_reporting_descriptor_reference_object_for_cwe_id(), sarif_builder::make_result_object(), sarif_result::on_nested_diagnostic(), json_output_format::on_report_diagnostic(), pp_write_text_as_dot_label_to_stream(), pp_write_text_as_html_like_dot_to_stream(), pp_write_text_to_stream(), print_generic_expr_to_str(), sarif_ice_notification::sarif_ice_notification(), simd_clone_mangle(), starts_infinite_loop_p(), str_pattern_slim(), pair_fusion_bb_info::track_access(), ubsan_type_descriptor(), and optrecord_json_writer::write().
|
inline |
|
extern |
Insert enough spaces into the output area of PRETTY-PRINTER to bring the column position to the current indentation level, assuming that a newline has just been written to the buffer.
References i, pp_indentation(), and pp_space.
Referenced by pretty_printer::emit_prefix(), pp_newline_and_indent(), json::array::print(), and json::object::print().
|
inline |
The amount of whitespace to be emitted when starting a new line.
Referenced by pp_indent(), pp_newline_and_indent(), json::array::print(), and json::object::print().
|
extern |
Return a pointer to the last character emitted in PRETTY-PRINTER's output area. A NULL pointer means no character available.
References output_buffer_last_position_in_text(), and pp_buffer().
|
inline |
Maximum characters per line in automatic line wrapping mode. Zero means don't wrap lines.
Referenced by diagnostic_context::initialize(), and pp_set_line_maximum_length().
|
inline |
|
inline |
TRUE if a newline character needs to be added before further formatting.
Referenced by announce_function(), dot_rdg_1(), irange_bitmask::dump(), vrange::dump(), dump_ssaname_info_to_file(), gimple_dump_bb(), make_item_for_dump_generic_expr(), make_item_for_dump_gimple_expr(), make_item_for_dump_gimple_stmt(), maybe_init_pretty_print(), pp_newline(), pp_newline_and_flush(), pp_newline_and_indent(), print_gimple_expr(), print_gimple_seq(), print_gimple_stmt(), and diagnostic_text_output_format::report_current_module().
|
extern |
Have PRETTY-PRINTER start a new line.
References output_buffer::m_line_length, pp_buffer(), and pp_needs_newline().
Referenced by gcc_rich_location::add_fixit_insert_formatted(), diagnostic_text_output_format::append_note(), dump_context::begin_scope(), default_diagnostic_start_span_fn(), default_diagnostic_text_finalizer(), digraph< GraphTraits >::dump_dot_to_pp(), dump_generic_node(), dump_gimple_assume(), dump_gimple_bind(), dump_gimple_fmt(), dump_gimple_omp_block(), dump_gimple_omp_critical(), dump_gimple_omp_dispatch(), dump_gimple_omp_for(), dump_gimple_omp_masked(), dump_gimple_omp_ordered(), dump_gimple_omp_parallel(), dump_gimple_omp_scan(), dump_gimple_omp_scope(), dump_gimple_omp_sections(), dump_gimple_omp_single(), dump_gimple_omp_target(), dump_gimple_omp_task(), dump_gimple_omp_taskgroup(), dump_gimple_omp_teams(), dump_gimple_seq(), dump_gimple_transaction(), dump_gimple_try(), dump_implicit_edges(), dump_phi_nodes(), ana::one_way_id_map< T >::dump_to_pp(), gimple_dump_bb_for_graph(), lhd_print_error_function(), make_item_for_dump_gimple_stmt(), newline_and_indent(), newline_and_indent(), diagnostic_text_sink::on_begin_text_diagnostic(), diagnostic_text_output_format::on_diagram(), diagnostic_text_output_format::on_report_diagnostic(), pp_character(), pp_newline_and_flush(), pp_newline_and_indent(), pp_wrap_text(), json::array::print(), json::object::print(), edited_line::print_content(), edited_file::print_diff(), print_insn_with_notes(), print_parseable_fixits(), print_pattern(), print_struct_decl(), graphviz_out::println(), diagnostic_text_output_format::report_current_module(), and ana::format::spacer().
|
extern |
References pp_flush(), pp_needs_newline(), and pp_newline().
Referenced by diagnostic_context::error_recursion(), gimple_dump_bb_buff(), lhd_print_error_function(), diagnostic_text_output_format::on_report_verbatim(), print_generic_stmt(), print_generic_stmt_indented(), print_gimple_seq(), print_gimple_stmt(), diagnostic_context::report_diagnostic(), and diagnostic_text_output_format::~diagnostic_text_output_format().
|
extern |
References pp_indent(), pp_indentation(), pp_needs_newline(), and pp_newline().
|
extern |
Phase 3 of formatting a message (phases 1 and 2 done by pp_format). Pop a pp_formatted_chunks from chunk_obstack, collecting all the tokens from phases 1 and 2 of formatting, and writing into text in formatted_obstack. If URLIFIER is non-null then use it on any quoted text that was not handled in phases 1 or 2 to potentially add URLs.
Referenced by simple_diagnostic_path::add_event(), simple_diagnostic_path::add_thread_event(), diagnostic_text_output_format::append_note(), libgdiagnostics_path_event::make_desc(), diagnostic_text_output_format::on_report_diagnostic(), json_output_format::on_report_diagnostic(), sarif_builder::on_report_diagnostic(), opt_problem::opt_problem(), pp_format_verbatim(), pp_printf(), pp_printf_n(), graphviz_out::print(), and graphviz_out::println().
|
inline |
|
inline |
Prefixing rule used in formatting a diagnostic message.
Referenced by diagnostic_context::set_prefixing_rule().
|
extern |
|
extern |
|
extern |
Flush the content of BUFFER onto the attached stream independently of the value of pp->output_buffer->flush_p.
References pretty_printer::clear_state(), pp_buffer(), and pp_write_text_to_stream().
Referenced by diagnostic_text_format_buffer::flush().
|
extern |
References pp_character(), and pp_space.
|
extern |
Sets the number of maximum characters per line PRETTY-PRINTER can output in line-wrapping mode. A LENGTH value 0 suppresses line-wrapping.
References pp_line_cutoff(), and pretty_printer::set_real_maximum_length().
Referenced by common_handle_option().
|
inline |
Referenced by diagnostic_text_output_format::append_note(), default_diagnostic_text_finalizer(), default_diagnostic_text_starter(), default_tree_diagnostic_text_starter(), lhd_print_error_function(), sarif_builder::make_message_object_for_diagram(), diagnostic_text_sink::on_begin_text_diagnostic(), diagnostic_text_output_format::on_diagram(), diagnostic_text_output_format::on_report_diagnostic(), pretty_printer::pretty_printer(), pretty_printer::pretty_printer(), diagnostic_text_output_format::print_any_cwe(), diagnostic_text_output_format::print_any_rules(), print_parseable_fixits(), and diagnostic_text_output_format::print_path().
|
inline |
Switch into verbatim mode and return the old mode.
Referenced by pretty_printer::format(), and pp_format_verbatim().
|
inline |
True if colors should be shown.
Referenced by diagnostic_text_output_format::build_prefix(), diagnostic_context::color_init(), default_diagnostic_start_span_fn(), default_token_printer(), diagnostic_output_format_init_json(), diagnostic_text_output_format::file_name_as_prefix(), diagnostic_event::get_desc(), diagnostic_text_output_format::get_location_text(), toplev::main(), libgdiagnostics_path_event::make_desc(), gcc::diagnostics_output_spec::text_scheme_handler::make_sink(), diagnostic_text_output_format::print_any_cwe(), diagnostic_text_output_format::print_any_rules(), libgdiagnostics_path_event::print_desc(), perpetual_start_cfg_edge_event::print_desc(), edited_file::print_diff(), edited_file::print_diff_hunk(), diagnostic_text_output_format::print_option_information(), diagnostic_text_output_format::print_path(), edited_file::print_run_of_changed_lines(), sarif_builder::sarif_token_printer::print_tokens(), diagnostic_text_output_format::update_printer(), json_output_format::update_printer(), and sarif_output_format::update_printer().
|
inline |
|
extern |
Append a STRING to the output area of PRETTY-PRINTER; the STRING may be line-wrapped if in appropriate mode.
References gcc_checking_assert, and pp_maybe_wrap_text().
Referenced by gcc_rich_location::add_fixit_insert_formatted(), element_event_desc::add_to_phase_2(), pp_element_quoted_string::add_to_phase_2(), pp_markup::comma_separated_quoted_strings::add_to_phase_2(), def_walker< reverse >::addr_reg_conflict_p(), asan_add_global(), asan_dynamic_init_call(), asan_emit_stack_protection(), graphviz_out::begin_td(), graphviz_out::begin_tr(), graphviz_out::begin_trtd(), pretty_printer::begin_url(), diagnostic_text_output_format::build_indent_prefix(), default_diagnostic_start_span_fn(), default_token_printer(), default_tree_printer(), infinite_loop_diagnostic::describe_final_event(), infinite_recursion_diagnostic::describe_final_event(), do_niy(), draw_cfg_node(), irange_bitmask::dump(), dump_array_domain(), dump_binary_rhs(), dump_block_node(), dump_decl_name(), digraph< GraphTraits >::dump_dot_to_pp(), dump_function_declaration(), dump_function_name(), dump_generic_node(), dump_gimple_asm(), dump_gimple_assign(), dump_gimple_assume(), dump_gimple_call(), dump_gimple_call_args(), dump_gimple_cond(), dump_gimple_fmt(), dump_gimple_label(), dump_gimple_mem_ops(), dump_gimple_omp_atomic_load(), dump_gimple_omp_atomic_store(), dump_gimple_omp_block(), dump_gimple_omp_continue(), dump_gimple_omp_critical(), dump_gimple_omp_dispatch(), dump_gimple_omp_for(), dump_gimple_omp_masked(), dump_gimple_omp_ordered(), dump_gimple_omp_parallel(), dump_gimple_omp_return(), dump_gimple_omp_scan(), dump_gimple_omp_scope(), dump_gimple_omp_sections(), dump_gimple_omp_single(), dump_gimple_omp_target(), dump_gimple_omp_task(), dump_gimple_omp_taskgroup(), dump_gimple_omp_teams(), dump_gimple_phi(), dump_gimple_return(), dump_gimple_switch(), dump_gimple_transaction(), dump_gimple_try(), dump_implicit_edges(), dump_location(), dump_mem_ref(), dump_omp_atomic_memory_order(), dump_omp_clause(), dump_omp_context_selector(), dump_omp_init_prefer_type(), dump_omp_iterators(), dump_omp_loop_non_rect_expr(), dump_ssaname_info(), dump_ternary_rhs(), ana::one_way_id_map< T >::dump_to_pp(), ana::record_layout::item::dump_to_pp(), diagnostic_event::meaning::dump_to_pp(), dump_unary_rhs(), dump_context::emit_item(), graphviz_out::end_td(), graphviz_out::end_tdtr(), graphviz_out::end_tr(), pretty_printer::end_url(), fixup_debug_use(), format_phase_2(), gimple_dump_bb_for_graph(), pp_begin_quote(), pp_cfg_jump(), pp_double_int(), pp_end_quote(), pp_gimple_stmt_1(), pp_points_to_solution(), pp_wide_int_large(), pretty_print_string(), ana::dynamic_call_info_t::print(), ana::rewind_info_t::print(), json::array::print(), json::float_number::print(), json::integer_number::print(), json::literal::print(), json::object::print(), diagnostic_text_output_format::print_any_cwe(), diagnostic_text_output_format::print_any_rules(), print_call_name(), edited_line::print_content(), print_declaration(), ana::end_cfg_edge_event::print_desc(), ana::end_consolidated_cfg_edges_event::print_desc(), libgdiagnostics_path_event::print_desc(), looping_back_event::print_desc(), simple_diagnostic_event::print_desc(), edited_file::print_diff(), edited_file::print_diff_hunk(), print_escaped_json_string(), print_escaped_string(), print_exp(), vrange_printer::print_frange_nan(), print_insn(), print_insn_with_notes(), print_int_bound(), print_irange_bitmasks(), diagnostic_text_output_format::print_option_information(), print_parseable_fixits(), print_pattern(), vrange_printer::print_real_value(), edited_file::print_run_of_changed_lines(), print_struct_decl(), dump_pretty_printer::custom_token_printer::print_tokens(), sarif_builder::sarif_token_printer::print_tokens(), print_value(), sarif_end_embedded_link(), simd_clone_mangle(), start_graph_dump(), pair_fusion_bb_info::track_access(), ubsan_type_descriptor(), vrange_printer::visit(), vrange_printer::visit(), vrange_printer::visit(), and vrange_printer::visit().
|
extern |
As per pp_string, but only append the first LEN of STR.
References gcc_checking_assert, and pp_maybe_wrap_text().
|
extern |
Take ownership of PP's prefix, setting it to NULL. This allows clients to save, override, and then restore an existing prefix, without it being free-ed.
Referenced by diagnostic_text_output_format::append_note(), default_diagnostic_text_finalizer(), lhd_print_error_function(), sarif_builder::make_message_object_for_diagram(), diagnostic_text_output_format::on_diagram(), diagnostic_text_output_format::print_any_cwe(), diagnostic_text_output_format::print_any_rules(), print_parseable_fixits(), and diagnostic_text_output_format::print_path().
|
inline |
True if identifiers are translated to the locale character set on output.
Referenced by dump_fancy_name(), make_item_for_dump_generic_expr(), maybe_init_pretty_print(), and pp_tree_identifier().
|
extern |
Append code point C to the output area of PRETTY-PRINTER, encoding it as UTF-8.
References limits, and pp_append_r().
Referenced by diagnostic_text_output_format::build_indent_prefix().
|
extern |
|
inline |
Referenced by make_item_for_dump_dec(), print_int_bound(), print_value(), and ubsan_type_descriptor().
void pp_wide_integer | ( | pretty_printer * | pp, |
const poly_int< N, T > & | x ) |
Print X to PP in decimal.
References poly_int< N, C >::coeffs, i, poly_int< N, C >::is_constant(), N, pp_comma, pp_left_bracket, pp_right_bracket, and pp_wide_integer().
Referenced by asan_emit_stack_protection(), dump_array_domain(), dump_generic_node(), format_phase_2(), pp_double_int(), pp_wide_integer(), and print_value().
|
inline |
Print I to PP in decimal.
|
inline |
Get or set the wrapping mode as a single entity.
Referenced by pp_format_verbatim().
|
extern |
As pp_write_text_to_stream, but for GraphViz label output. Flush the formatted text of pretty-printer PP onto the attached stream. Replace characters in PPF that have special meaning in a GraphViz .dot file. This routine is not very fast, but it doesn't have to be as this is only be used by routines dumping intermediate representations in graph form.
References fputc(), gcc_assert, output_buffer::m_stream, pp_buffer(), pp_clear_output_area(), and pp_formatted_text().
Referenced by gimple_dump_bb_for_graph(), rtl_dump_bb_for_graph(), and start_graph_dump().
|
extern |
As pp_write_text_to_stream, but for GraphViz HTML-like strings. Flush the formatted text of pretty-printer PP onto the attached stream, escaping these characters " & < > using XML escape sequences. http://www.graphviz.org/doc/info/lang.html#html states: special XML escape sequences for ", &, <, and > may be necessary in order to embed these characters in attribute values or raw text This doesn't list "'" (which would normally be escaped in XML as "'" or in HTML as "'");. Experiments show that escaping "'" doesn't seem to be necessary.
References fputc(), output_buffer::m_stream, pp_buffer(), pp_clear_output_area(), and pp_formatted_text().
|
extern |
Flush the formatted text of PRETTY-PRINTER onto the attached stream.
References pp_buffer(), pp_clear_output_area(), and pp_formatted_text().
Referenced by graphviz_out::begin_td(), graphviz_out::begin_tr(), graphviz_out::begin_trtd(), draw_cfg_node(), dump_bb_for_graph(), graphviz_out::end_td(), graphviz_out::end_tdtr(), graphviz_out::end_tr(), gimple_dump_bb_for_graph(), pp_flush(), pp_really_flush(), print_generic_decl(), rtl_dump_bb_for_graph(), and start_graph_dump().
|
extern |
Allocator for identifier_to_locale and corresponding function to free memory.
Referenced by general_init(), and identifier_to_locale().
|
extern |
Referenced by general_init(), and identifier_to_locale().