aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.cc
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2024-09-03 15:11:06 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2024-09-03 15:16:39 -0400
commit07e74798b93c256bea3a91895d3517223a58da61 (patch)
tree1ab05a39f81406c8a1260aa8e22d30fef9b3f74a /gcc/expr.cc
parentd0891f3aa75d31744de728905f2f454e9d07ce54 (diff)
downloadgcc-07e74798b93c256bea3a91895d3517223a58da61.zip
gcc-07e74798b93c256bea3a91895d3517223a58da61.tar.gz
gcc-07e74798b93c256bea3a91895d3517223a58da61.tar.bz2
pretty-print: split up pretty_printer::format into subroutines
The body of pretty_printer::format is almost 500 lines long, mostly comprising two distinct phases. This patch splits it up so that there are explicit subroutines for the two different phases, reducing the scope of various locals, and making it easier to e.g. put a breakpoint on phase 2. No functional change intended. gcc/ChangeLog: * pretty-print-markup.h (pp_markup::context::context): Drop params "buf" and "chunk_idx", initializing m_buf from pp. (pp_markup::context::m_chunk_idx): Drop field. * pretty-print.cc (pretty_printer::format): Convert param from a text_info * to a text_info &. Split out phase 1 and phase 2 into subroutines... (format_phase_1): New, from pretty_printer::format. (format_phase_2): Likewise. * pretty-print.h (pretty_printer::format): Convert param from a text_info * to a text_info &. (pp_format): Update for above change. Assert that text_info is non-null. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions