GCC Middle and Back End API Reference
pretty_print_token_buffer Class Reference

#include <pretty-print-token-buffer.h>

Inheritance diagram for pretty_print_token_buffer:
Collaboration diagram for pretty_print_token_buffer:

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_obstackm_obstack
pp_token_list m_tokens

Detailed Description

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.   

Constructor & Destructor Documentation

◆ pretty_print_token_buffer() [1/4]

pretty_print_token_buffer::pretty_print_token_buffer ( )

◆ pretty_print_token_buffer() [2/4]

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().

◆ pretty_print_token_buffer() [3/4]

pretty_print_token_buffer::pretty_print_token_buffer ( const pretty_print_token_buffer & )
delete

◆ pretty_print_token_buffer() [4/4]

pretty_print_token_buffer::pretty_print_token_buffer ( pretty_print_token_buffer && other)

◆ ~pretty_print_token_buffer()

pretty_print_token_buffer::~pretty_print_token_buffer ( )
default

Member Function Documentation

◆ dump() [1/2]

void DEBUG_FUNCTION pretty_print_token_buffer::dump ( ) const
inline

References DEBUG_FUNCTION, and dump().

Referenced by dump().

◆ dump() [2/2]

void pretty_print_token_buffer::dump ( FILE * out) const
inline

References m_tokens.

◆ to_string()

Field Documentation

◆ m_obstack

std::unique_ptr<auto_obstack> pretty_print_token_buffer::m_obstack

◆ m_tokens


The documentation for this class was generated from the following files: