]> git.ipfire.org Git - thirdparty/gcc.git/commit
diagnostics: move text output member functions to correct file
authorDavid Malcolm <dmalcolm@redhat.com>
Thu, 10 Oct 2024 01:26:09 +0000 (21:26 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Thu, 10 Oct 2024 01:26:09 +0000 (21:26 -0400)
commit00ede02bc8bb73da8f4bf1d7542142cd923b0c54
tree27a5fc7c18a690081067b3d37b2e9b957e356945
parenta4e4f2d22589a8565bebf906930bf6a536a81167
diagnostics: move text output member functions to correct file

No functional change intended.

gcc/ChangeLog:
* diagnostic-format-text.cc
(diagnostic_text_output_format::after_diagnostic): Replace call to
show_any_path with body, taken from diagnostic.cc.
(diagnostic_text_output_format::build_prefix): Move here from
diagnostic.cc, updating to use get_diagnostic_kind_text and
diagnostic_get_color_for_kind.
(diagnostic_text_output_format::file_name_as_prefix): Move here
from diagnostic.cc
(diagnostic_text_output_format::append_note): Likewise.
* diagnostic-format-text.h
(diagnostic_text_output_format::show_any_path): Drop decl.
* diagnostic.cc
(diagnostic_text_output_format::file_name_as_prefix): Move to
diagnostic-format-text.cc.
(diagnostic_text_output_format::build_prefix): Likewise.
(diagnostic_text_output_format::show_any_path): Move to body of
diagnostic_text_output_format::after_diagnostic.
(diagnostic_text_output_format::append_note): Move to
diagnostic-format-text.cc.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/diagnostic-format-text.cc
gcc/diagnostic-format-text.h
gcc/diagnostic.cc