r279244 - in /trunk/gcc: ChangeLog c-family/Cha...
dmalcolm@gcc.gnu.org
dmalcolm@gcc.gnu.org
Wed Dec 11 19:06:00 GMT 2019
Author: dmalcolm
Date: Wed Dec 11 19:06:39 2019
New Revision: 279244
URL: https://gcc.gnu.org/viewcvs?rev=279244&root=gcc&view=rev
Log:
Introduce pretty_printer::clone vfunc
This patch provides a way to clone a pretty_printer.
This is needed so that we can capture text in a label_text and make
layout decisions based on it, using the policy of global_dc's printer,
whilst within a call to diagnostic_show_locus. We can't print with
the pretty_printer itself within a call to diagnostic_show_locus since
it has partly-buffered content.
gcc/c-family/ChangeLog:
* c-pretty-print.c (c_pretty_printer::clone): New vfunc
implementation.
* c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
gcc/cp/ChangeLog:
* cxx-pretty-print.c (cxx_pretty_printer::clone): New vfunc
implementation.
* cxx-pretty-print.h (cxx_pretty_printer::clone): New vfunc decl.
* error.c (cxx_format_postprocessor::clone): New vfunc.
gcc/ChangeLog:
* pretty-print.c (pretty_printer::pretty_printer): New copy-ctor.
(pretty_printer::clone): New vfunc implementation.
* pretty-print.h (format_postprocessor::clone): New pure vfunc
decl.
(pretty_printer::pretty_printer): New copy-ctor decl.
(pretty_printer::clone): New vfunc decl.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-pretty-print.c
trunk/gcc/c-family/c-pretty-print.h
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cxx-pretty-print.c
trunk/gcc/cp/cxx-pretty-print.h
trunk/gcc/cp/error.c
trunk/gcc/pretty-print.c
trunk/gcc/pretty-print.h
More information about the Gcc-cvs
mailing list