]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
diagnostics: simplify header files
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 25 Jul 2025 19:13:43 +0000 (15:13 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Fri, 25 Jul 2025 19:13:43 +0000 (15:13 -0400)
No functional change intended.

gcc/ChangeLog:
* diagnostic.h: Move include of "unique-argv.h"
and various forward decls into...
* diagnostics/context.h: ...here.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/diagnostic.h
gcc/diagnostics/context.h

index 168adee1c506f79a967ac65ee503ff536f506c4d..6f2e77031acffecd8ce7bd63f1fc8836fdc02394 100644 (file)
@@ -21,42 +21,12 @@ along with GCC; see the file COPYING3.  If not see
 #ifndef GCC_DIAGNOSTIC_H
 #define GCC_DIAGNOSTIC_H
 
-#include "unique-argv.h"
 #include "rich-location.h"
 #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 +121,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.  */
index c985d51f4706f8dc593b9a9c3d2d1c7ea5d56d99..cd8b340f173ae13d0e6ef62bec867bccdf401424 100644 (file)
@@ -20,11 +20,44 @@ along with GCC; see the file COPYING3.  If not see
 #ifndef GCC_DIAGNOSTICS_CONTEXT_H
 #define GCC_DIAGNOSTICS_CONTEXT_H
 
+#include "unique-argv.h"
 #include "diagnostics/option-classifier.h"
 
 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;