|
GCC Middle and Back End API Reference
|
#include <pretty-print-token-buffer.h>


Public Member Functions | |
| pretty_print_token_buffer () | |
| pretty_print_token_buffer (const char *gmsgid, va_list *args) | |
| pretty_print_token_buffer (const pretty_print_token_buffer &)=delete | |
| pretty_print_token_buffer (pretty_print_token_buffer &&) | |
| ~pretty_print_token_buffer ()=default | |
| std::string | to_string () const |
| void | dump (FILE *out) const |
| void DEBUG_FUNCTION | dump () const |
Data Fields | |
| std::unique_ptr< auto_obstack > | m_obstack |
| pp_token_list | m_tokens |
Capturing the results of pretty_print for later playback. Copyright (C) 2023-2026 Free Software Foundation, Inc. Contributed by David Malcolm <dmalcolm@redhat.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 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/>.
A class for capturing the results of pretty-printing as tokens, potentially for playback into a different pretty-printer.
| pretty_print_token_buffer::pretty_print_token_buffer | ( | ) |
References m_obstack, and m_tokens.
Referenced by diagnostic_message_buffer::diagnostic_message_buffer(), pretty_print_token_buffer(), and pretty_print_token_buffer().
| pretty_print_token_buffer::pretty_print_token_buffer | ( | const char * | gmsgid, |
| va_list * | args ) |
Capture GMSGID and ARGS as a sequence of pretty_print tokens.
References errno, m_obstack, m_tokens, pp_format(), pp_output_formatted_text(), pretty_printer::set_output_stream(), and pretty_printer::set_token_printer().
|
delete |
References pretty_print_token_buffer().
| pretty_print_token_buffer::pretty_print_token_buffer | ( | pretty_print_token_buffer && | other | ) |
References m_obstack, m_tokens, and pretty_print_token_buffer().
|
default |
|
inline |
References DEBUG_FUNCTION, and dump().
Referenced by dump().
|
inline |
References m_tokens.
| std::string pretty_print_token_buffer::to_string | ( | ) | const |
Convert to text, dropping colorization, URLs, etc.
References as_a(), pp_token::begin_color, pp_token::begin_quote, pp_token::begin_url, close_quote, pp_token::custom_data, pp_token::end_color, pp_token::end_quote, pp_token::end_url, pp_token::event_id, gcc_assert, gcc_unreachable, m_tokens, open_quote, and pp_token::text.
Referenced by diagnostic_graph_add_edge_via_msg_buf(), diagnostic_graph_set_description_via_msg_buf(), and diagnostic_node_set_label_via_msg_buf().
| std::unique_ptr<auto_obstack> pretty_print_token_buffer::m_obstack |
Referenced by pretty_print_token_buffer(), pretty_print_token_buffer(), and pretty_print_token_buffer().
| pp_token_list pretty_print_token_buffer::m_tokens |
Referenced by diagnostic_message_buffer_append_byte(), diagnostic_message_buffer_append_event_id(), diagnostic_message_buffer_append_printf(), diagnostic_message_buffer_append_str(), diagnostic_message_buffer_append_text(), diagnostic_message_buffer_begin_color(), diagnostic_message_buffer_begin_quote(), diagnostic_message_buffer_begin_url(), diagnostic_message_buffer_dump(), diagnostic_message_buffer_end_color(), diagnostic_message_buffer_end_quote(), diagnostic_message_buffer_end_url(), dump(), pretty_print_token_buffer(), pretty_print_token_buffer(), pretty_print_token_buffer(), and to_string().