]> git.ipfire.org Git - thirdparty/gcc.git/commit
diagnostics: split path-printing into a new diagnostic-path-output.cc
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 27 May 2025 16:22:25 +0000 (12:22 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Tue, 27 May 2025 16:22:25 +0000 (12:22 -0400)
commit7fda941722b8e71bab118fb46198c9db9d90fb04
treeb7357124709a3038129fbb6ec9650ce607284e37
parent6790558b4da2ffce55e507807b8f46e5dd5ad2b4
diagnostics: split path-printing into a new diagnostic-path-output.cc

No functional change intended.

gcc/ChangeLog:
* Makefile.in (OBJS-libcommon): Add diagnostic-path-output.o.
* diagnostic-path-output.cc: New file, taken from material in
diagnostic-path.cc.
* diagnostic-path.cc: Drop includes of
"diagnostic-macro-unwinding.h", "intl.h", "gcc-rich-location.h",
"diagnostic-color.h", "diagnostic-event-id.h",
"diagnostic-label-effects.h", "pretty-print-markup.h",
"selftest.h", "selftest-diagnostic.h",
"selftest-diagnostic-path.h", "text-art/theme.h", and
"diagnostic-format-text.h".
(class path_print_policy): Move to diagnostic-path-output.cc.
(class path_label): Likewise.
(can_consolidate_events): Likewise.
(class per_thread_summary): Likewise.
(struct event_range): Likewise.
(struct path_summary): Likewise.
(per_thread_summary::interprocedural_p): Likewise.
(path_summary::path_summary): Likewise.
(write_indent): Likewise.
(base_indent): Likewise.
(per_frame_indent): Likewise.
(class thread_event_printer): Likewise.
(print_path_summary_as_text): Likewise.
(class element_event_desc): Likewise.
(diagnostic_text_output_format::print_path): Likewise.
(selftest::path_events_have_column_data_p): Likewise.
(selftest::test_empty_path): Likewise.
(selftest::test_intraprocedural_path): Likewise.
(selftest::test_interprocedural_path_1): Likewise.
(selftest::test_interprocedural_path_2): Likewise.
(selftest::test_recursion): Likewise.
(class selftest::control_flow_test): Likewise.
(selftest::test_control_flow_1): Likewise.
(selftest::test_control_flow_2): Likewise.
(selftest::test_control_flow_3): Likewise.
(selftest::assert_cfg_edge_path_streq): Likewise.
(ASSERT_CFG_EDGE_PATH_STREQ): Likewise.
(selftest::test_control_flow_4): Likewise.
(selftest::test_control_flow_5): Likewise.
(selftest::test_control_flow_6): Likewise.
(selftest::control_flow_tests): Likewise.
(selftest::diagnostic_path_cc_tests): Likewise, renaming
accordingly.
* selftest-run-tests.cc (selftest::run_tests): Update for
move of path-printing selftests.
* selftest.h (selftest::diagnostic_path_cc_tests): Replace decl
with...
(selftest::diagnostic_path_output_cc_tests): ...this.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/Makefile.in
gcc/diagnostic-path-output.cc [new file with mode: 0644]
gcc/diagnostic-path.cc
gcc/selftest-run-tests.cc
gcc/selftest.h