From 4a05da1c5c0303b5713c4fa252faedc02c4478ae Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Fri, 18 Jul 2025 17:14:58 -0400 Subject: [PATCH 41/41] FIXME: simplifying header files --- gcc/diagnostic.h | 36 ++---------------------------------- gcc/diagnostics/context.h | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h index 168adee1c506..e39ba5a4ab49 100644 --- a/gcc/diagnostic.h +++ b/gcc/diagnostic.h @@ -26,37 +26,8 @@ along with GCC; see the file COPYING3. If not see #include "pretty-print.h" #include "diagnostic-core.h" -namespace diagnostics { - - // diagnostics::digraphs - namespace digraphs { - class lazy_digraph; - } // namespace diagnostics::digraphs - - // diagnostics::logical_locations - namespace logical_locations { - class manager; - } // namespace diagnostics::logical_locations - - class buffer; - class client_data_hooks; - class diagram; - class sink; - class text_sink; - - class source_effect_info; - -} // namespace diagnostics - -namespace text_art -{ - class theme; -} // namespace text_art - -namespace xml -{ - class printer; -} // namespace xml +#include "diagnostics/diagnostic-info.h" +typedef diagnostics::diagnostic_info diagnostic_info; /* An enum for controlling what units to use for the column number when diagnostics are output, used by the -fdiagnostics-column-unit option. @@ -151,9 +122,6 @@ enum diagnostic_text_art_charset DIAGNOSTICS_TEXT_ART_CHARSET_EMOJI }; -#include "diagnostics/diagnostic-info.h" -typedef diagnostics::diagnostic_info diagnostic_info; - #include "diagnostics/context.h" /* Extension hooks for client. */ diff --git a/gcc/diagnostics/context.h b/gcc/diagnostics/context.h index c985d51f4706..958d2cd7f1c0 100644 --- a/gcc/diagnostics/context.h +++ b/gcc/diagnostics/context.h @@ -24,7 +24,39 @@ along with GCC; see the file COPYING3. If not see namespace diagnostics { -namespace changes { class change_set; } + namespace changes { + class change_set; + } + + namespace digraphs { + class lazy_digraph; + } + + namespace logical_locations { + class manager; + } + + class buffer; + class client_data_hooks; + class diagram; + class sink; + class text_sink; + + class source_effect_info; + +} // namespace diagnostics + +namespace text_art +{ + class theme; +} // namespace text_art + +namespace xml +{ + class printer; +} // namespace xml + +namespace diagnostics { /* Forward declarations. */ class context; -- 2.26.3