GCC Middle and Back End API Reference
|
#include <tree-diagnostic.h>
Public Member Functions | |
tree_dump_pretty_printer (FILE *outf) | |
~tree_dump_pretty_printer () | |
virtual std::unique_ptr< pretty_printer > | clone () const |
void | set_output_stream (FILE *outfile) |
void | set_token_printer (token_printer *tp) |
void | set_prefix (char *prefix) |
void | emit_prefix () |
void | format (text_info &text) |
void | maybe_space () |
bool | supports_urls_p () const |
diagnostic_url_format | get_url_format () const |
void | set_url_format (diagnostic_url_format url_format) |
void | begin_url (const char *url) |
void | end_url () |
pp_wrapping_mode_t | set_verbatim_wrapping () |
void | set_padding (pp_padding padding) |
pp_padding | get_padding () const |
void | clear_state () |
void | set_real_maximum_length () |
int | remaining_character_count_for_line () |
void | dump (FILE *out, int indent) const |
void DEBUG_FUNCTION | dump () const |
A subclass of pretty_printer for writing "dump" functions. Wires itself up to a FILE *, and colorizes if it's stderr and the user requested colorization.
|
inline |
|
inline |
References pp_flush().
|
inherited |
Support for encoding URLs. See egmontkob/Hyperlinks_in_Terminal_Emulators.md ( https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda ). > A hyperlink is opened upon encountering an OSC 8 escape sequence with > the target URI. The syntax is > > OSC 8 ; params ; URI ST > > A hyperlink is closed with the same escape sequence, omitting the > parameters and the URI but keeping the separators: > > OSC 8 ; ; ST > > OSC (operating system command) is typically ESC ]. Use BEL instead of ST, as that is currently rendered better in some terminal emulators that don't support OSC 8, like konsole.
If URL-printing is enabled, write an "open URL" escape sequence to PP for the given URL.
References gcc_unreachable, pretty_printer::m_skipping_null_url, pretty_printer::m_url_format, pp_string(), URL_FORMAT_BEL, URL_FORMAT_NONE, and URL_FORMAT_ST.
|
inlineinherited |
Clear this pretty_printer's output state.
References pretty_printer::m_emitted_prefix, and pretty_printer::pp_indentation.
Referenced by pretty_printer::format(), pp_flush(), and pp_really_flush().
|
virtualinherited |
Base class implementation of pretty_printer::clone vfunc.
Referenced by element_event_desc::add_to_phase_2(), diagnostic_context::clone_printer(), diagnostic_event::get_desc(), make_json_for_path(), and sarif_builder::make_location_object().
|
inlineinherited |
References pretty_printer::dump().
Referenced by pretty_printer::dump().
|
inherited |
Dump state of this pretty_printer to OUT, for debugging.
References output_buffer::dump(), gcc_unreachable, pretty_printer::m_buffer, pretty_printer::m_show_color, pretty_printer::m_url_format, URL_FORMAT_BEL, URL_FORMAT_NONE, and URL_FORMAT_ST.
Referenced by diagnostic_context::dump().
|
inherited |
Write out this pretty_printer's prefix.
References DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE, DIAGNOSTICS_SHOW_PREFIX_NEVER, DIAGNOSTICS_SHOW_PREFIX_ONCE, pretty_printer::m_emitted_prefix, pretty_printer::m_prefix, pp_append_r(), pp_indent(), pretty_printer::pp_indentation, and pretty_printer::pp_prefixing_rule.
Referenced by pp_append_text().
|
inherited |
If URL-printing is enabled, write a "close URL" escape sequence to PP.
References get_end_url_string(), pretty_printer::m_skipping_null_url, pretty_printer::m_url_format, pp_string(), and URL_FORMAT_NONE.
|
inherited |
References pretty_printer::clear_state(), format_phase_1(), format_phase_2(), format_postprocessor::handle(), pp_formatted_chunks::m_args, pretty_printer::m_buffer, output_buffer::m_chunk_obstack, pretty_printer::m_format_postprocessor, output_buffer::m_formatted_obstack, output_buffer::m_line_length, output_buffer::m_obstack, PP_NL_ARGMAX, pp_set_verbatim_wrapping(), pretty_printer::pp_wrapping_mode, and output_buffer::push_formatted_chunks().
Referenced by dump_printf(), dump_printf_loc(), dump_context::dump_printf_loc_va(), and dump_context::dump_printf_va().
|
inlineinherited |
References pretty_printer::m_padding.
|
inlineinherited |
References pretty_printer::m_url_format.
Referenced by get_end_url_string(), diagnostic_text_output_format::update_printer(), and diagnostic_context::urls_init().
|
inherited |
Maybe print out a whitespace if needed.
References pretty_printer::m_padding, pp_none, and pp_space.
|
inherited |
Return the amount of characters PRETTY-PRINTER can accept to make a full line. Meaningful only in line-wrapping mode.
References output_buffer::m_line_length, pretty_printer::m_maximum_length, and pretty_printer::pp_buffer.
Referenced by pp_character(), and pp_wrap_text().
|
inlineinherited |
References pretty_printer::m_buffer, and output_buffer::m_stream.
Referenced by dot_rdg_1(), ana::one_way_id_map< T >::dump(), irange_bitmask::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(), libgdiagnostics_path_event::make_desc(), maybe_init_pretty_print(), print_gimple_expr(), print_gimple_seq(), print_gimple_stmt(), print_graph_cfg(), print_node(), start_graph_dump(), tree_dump_pretty_printer(), and diagnostic_manager::write_patch().
|
inlineinherited |
References pretty_printer::m_padding.
|
inherited |
Set PREFIX for PRETTY-PRINTER, taking ownership of PREFIX, which will eventually be free-ed.
References free(), pretty_printer::m_emitted_prefix, pretty_printer::m_prefix, pretty_printer::pp_indentation, and pretty_printer::set_real_maximum_length().
Referenced by lhd_print_error_function().
|
inherited |
Subroutine of pp_set_maximum_length. Set up PRETTY-PRINTER's internal maximum characters per line.
References DIAGNOSTICS_SHOW_PREFIX_NEVER, DIAGNOSTICS_SHOW_PREFIX_ONCE, pretty_printer::m_maximum_length, pretty_printer::m_prefix, pp_is_wrapping_line, pretty_printer::pp_line_cutoff, and pretty_printer::pp_prefixing_rule.
Referenced by pp_set_line_maximum_length(), and pretty_printer::set_prefix().
|
inlineinherited |
References pretty_printer::m_token_printer.
Referenced by dump_pretty_printer::dump_pretty_printer(), and sarif_output_format::update_printer().
|
inlineinherited |
References pretty_printer::m_url_format.
Referenced by diagnostic_context::urls_init().
|
inlineinherited |
|
inlineinherited |
|
privateinherited |
|
privateinherited |
Referenced by pretty_printer::clear_state(), pretty_printer::emit_prefix(), and pretty_printer::set_prefix().
|
privateinherited |
|
privateinherited |
Referenced by pretty_printer::format(), pretty_printer::pretty_printer(), and pretty_printer::~pretty_printer().
|
privateinherited |
|
privateinherited |
|
privateinherited |
|
privateinherited |
Referenced by pretty_printer::get_padding(), pretty_printer::maybe_space(), and pretty_printer::set_padding().
|
privateinherited |
|
privateinherited |
Referenced by pretty_printer::dump().
|
privateinherited |
|
privateinherited |
Referenced by pretty_printer::begin_url(), and pretty_printer::end_url().
|
privateinherited |
Referenced by pretty_printer::set_token_printer().
|
privateinherited |
|
privateinherited |
|
privateinherited |