aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2025-07-25 15:13:43 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2025-07-25 15:13:43 -0400
commit84c4bf5a00541481711ed1f0723e822f3396cd6b (patch)
treea5c11c3b734849a6f9adae4f98e45546b75283c1 /gcc
parent8d9d9515f5db9bab758e484f3956033150931de5 (diff)
downloadgcc-84c4bf5a00541481711ed1f0723e822f3396cd6b.zip
gcc-84c4bf5a00541481711ed1f0723e822f3396cd6b.tar.gz
gcc-84c4bf5a00541481711ed1f0723e822f3396cd6b.tar.bz2
diagnostics: simplify header files
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>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/diagnostic.h37
-rw-r--r--gcc/diagnostics/context.h35
2 files changed, 36 insertions, 36 deletions
diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h
index 168adee..6f2e770 100644
--- a/gcc/diagnostic.h
+++ b/gcc/diagnostic.h
@@ -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. */
diff --git a/gcc/diagnostics/context.h b/gcc/diagnostics/context.h
index c985d51..cd8b340 100644
--- a/gcc/diagnostics/context.h
+++ b/gcc/diagnostics/context.h
@@ -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;