aboutsummaryrefslogtreecommitdiff
path: root/gcc/dumpfile.cc
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2023-10-03 09:39:16 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2023-10-03 09:39:16 -0400
commitc44ca7c01226e0768e58c5b274ddd5e161378010 (patch)
tree65989de19c04f19fc70f37acddc8256540744887 /gcc/dumpfile.cc
parent09881218137f4af9b7c894c2d350cf2ff8e0ee23 (diff)
downloadgcc-c44ca7c01226e0768e58c5b274ddd5e161378010.zip
gcc-c44ca7c01226e0768e58c5b274ddd5e161378010.tar.gz
gcc-c44ca7c01226e0768e58c5b274ddd5e161378010.tar.bz2
diagnostics: add ctors to text_info; add m_ prefixes to fields
No functional change intended. gcc/ada/ChangeLog: * gcc-interface/misc.cc: Use text_info ctor. gcc/analyzer/ChangeLog: * analyzer-logging.cc (logger::log_va_partial): Use text_info ctor. * analyzer.cc (make_label_text): Likewise. (make_label_text_n): Likewise. * pending-diagnostic.cc (evdesc::event_desc::formatted_print): Likewise. gcc/c/ChangeLog: * c-objc-common.cc (c_tree_printer): Update for "m_" prefixes to text_info fields. gcc/cp/ChangeLog: * error.cc: Update for "m_" prefixes to text_info fields. gcc/d/ChangeLog: * d-diagnostic.cc (d_diagnostic_report_diagnostic): Use text_info ctor. gcc/ChangeLog: * diagnostic.cc (diagnostic_set_info_translated): Update for "m_" prefixes to text_info fields. (diagnostic_report_diagnostic): Likewise. (verbatim): Use text_info ctor. (simple_diagnostic_path::add_event): Likewise. (simple_diagnostic_path::add_thread_event): Likewise. * dumpfile.cc (dump_pretty_printer::decode_format): Update for "m_" prefixes to text_info fields. (dump_context::dump_printf_va): Use text_info ctor. * graphviz.cc (graphviz_out::graphviz_out): Use text_info ctor. (graphviz_out::print): Likewise. * opt-problem.cc (opt_problem::opt_problem): Likewise. * pretty-print.cc (pp_format): Update for "m_" prefixes to text_info fields. (pp_printf): Use text_info ctor. (pp_verbatim): Likewise. (assert_pp_format_va): Likewise. * pretty-print.h (struct text_info): Add ctors. Add "m_" prefix to all fields. * text-art/styled-string.cc (styled_string::from_fmt_va): Use text_info ctor. * tree-diagnostic.cc (default_tree_printer): Update for "m_" prefixes to text_info fields. * tree-pretty-print.h (pp_ti_abstract_origin): Likewise. gcc/fortran/ChangeLog: * error.cc (gfc_format_decoder): Update for "m_" prefixes to text_info fields. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/dumpfile.cc')
-rw-r--r--gcc/dumpfile.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/gcc/dumpfile.cc b/gcc/dumpfile.cc
index a2050d1..1e72aaf 100644
--- a/gcc/dumpfile.cc
+++ b/gcc/dumpfile.cc
@@ -951,7 +951,7 @@ dump_pretty_printer::decode_format (text_info *text, const char *spec,
{
case 'C':
{
- cgraph_node *node = va_arg (*text->args_ptr, cgraph_node *);
+ cgraph_node *node = va_arg (*text->m_args_ptr, cgraph_node *);
/* Make an item for the node, and stash it. */
optinfo_item *item = make_item_for_dump_symtab_node (node);
@@ -961,7 +961,7 @@ dump_pretty_printer::decode_format (text_info *text, const char *spec,
case 'E':
{
- gimple *stmt = va_arg (*text->args_ptr, gimple *);
+ gimple *stmt = va_arg (*text->m_args_ptr, gimple *);
/* Make an item for the stmt, and stash it. */
optinfo_item *item = make_item_for_dump_gimple_expr (stmt, 0, TDF_SLIM);
@@ -971,7 +971,7 @@ dump_pretty_printer::decode_format (text_info *text, const char *spec,
case 'G':
{
- gimple *stmt = va_arg (*text->args_ptr, gimple *);
+ gimple *stmt = va_arg (*text->m_args_ptr, gimple *);
/* Make an item for the stmt, and stash it. */
optinfo_item *item = make_item_for_dump_gimple_stmt (stmt, 0, TDF_SLIM);
@@ -981,7 +981,7 @@ dump_pretty_printer::decode_format (text_info *text, const char *spec,
case 'T':
{
- tree t = va_arg (*text->args_ptr, tree);
+ tree t = va_arg (*text->m_args_ptr, tree);
/* Make an item for the tree, and stash it. */
optinfo_item *item = make_item_for_dump_generic_expr (t, TDF_SLIM);
@@ -1002,10 +1002,7 @@ dump_context::dump_printf_va (const dump_metadata_t &metadata, const char *forma
{
dump_pretty_printer pp (this, metadata.get_dump_flags ());
- text_info text;
- text.err_no = errno;
- text.args_ptr = ap;
- text.format_spec = format;
+ text_info text (format, ap, errno);
/* Phases 1 and 2, using pp_format. */
pp_format (&pp, &text);