This has GCC-specific stuff in it (options and "GTY"), and so should not be in the "diagnostics/" subdir, and should avoid a "diagnostics" prefix in its name.
No functional change intended. gcc/ChangeLog: * Makefile.in (OBJS-libcommon): Replace diagnostic-spec.o with gcc-diagnostic-spec.o. (GTFILES): Replace diagnostic-spec.h with gcc-diagnostic-spec.h. * diagnostic-spec.cc: Move to... * gcc-diagnostic-spec.cc: ...here. * diagnostic-spec.h: Move to... * gcc-diagnostic-spec.h: ...here. * gengtype.cc (open_base_files): Replace diagnostic-spec.h with gcc-diagnostic-spec.h. * warning-control.cc: Likewise. --- gcc/Makefile.in | 5 +++-- gcc/{diagnostic-spec.cc => gcc-diagnostic-spec.cc} | 2 +- gcc/{diagnostic-spec.h => gcc-diagnostic-spec.h} | 6 +++--- gcc/gengtype.cc | 2 +- gcc/warning-control.cc | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) rename gcc/{diagnostic-spec.cc => gcc-diagnostic-spec.cc} (99%) rename gcc/{diagnostic-spec.h => gcc-diagnostic-spec.h} (96%) diff --git a/gcc/Makefile.in b/gcc/Makefile.in index c4b6b1f2127d..5b33951440d6 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1851,7 +1851,7 @@ OBJS = \ # Objects in libcommon.a, potentially used by all host binaries and with # no target dependencies. -OBJS-libcommon = diagnostic-spec.o diagnostic.o \ +OBJS-libcommon = diagnostic.o \ diagnostic-global-context.o \ diagnostics/buffering.o \ diagnostics/changes.o \ @@ -1873,6 +1873,7 @@ OBJS-libcommon = diagnostic-spec.o diagnostic.o \ diagnostics/selftest-logical-locations.o \ diagnostics/selftest-paths.o \ diagnostics/diagnostics-selftests.o \ + gcc-diagnostic-spec.o \ graphviz.o pex.o \ pretty-print.o intl.o \ json.o json-parsing.o \ @@ -3044,7 +3045,7 @@ GTFILES = $(CPPLIB_H) $(srcdir)/input.h $(srcdir)/coretypes.h \ $(srcdir)/ipa-modref-tree.h \ $(srcdir)/ipa-locality-cloning.cc \ $(srcdir)/signop.h \ - $(srcdir)/diagnostic-spec.h $(srcdir)/diagnostic-spec.cc \ + $(srcdir)/gcc-diagnostic-spec.h $(srcdir)/gcc-diagnostic-spec.cc \ $(srcdir)/dwarf2out.h \ $(srcdir)/dwarf2asm.cc \ $(srcdir)/dwarf2cfi.cc \ diff --git a/gcc/diagnostic-spec.cc b/gcc/gcc-diagnostic-spec.cc similarity index 99% rename from gcc/diagnostic-spec.cc rename to gcc/gcc-diagnostic-spec.cc index b43ae637c161..99ca6a00ba7b 100644 --- a/gcc/diagnostic-spec.cc +++ b/gcc/gcc-diagnostic-spec.cc @@ -27,7 +27,7 @@ #include "tree.h" #include "cgraph.h" #include "hash-map.h" -#include "diagnostic-spec.h" +#include "gcc-diagnostic-spec.h" #include "pretty-print.h" #include "options.h" diff --git a/gcc/diagnostic-spec.h b/gcc/gcc-diagnostic-spec.h similarity index 96% rename from gcc/diagnostic-spec.h rename to gcc/gcc-diagnostic-spec.h index 13455ce1a615..2b5e784d238d 100644 --- a/gcc/diagnostic-spec.h +++ b/gcc/gcc-diagnostic-spec.h @@ -19,8 +19,8 @@ along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ -#ifndef DIAGNOSTIC_SPEC_H_INCLUDED -#define DIAGNOSTIC_SPEC_H_INCLUDED +#ifndef GCC_DIAGNOSTIC_SPEC_H_INCLUDED +#define GCC_DIAGNOSTIC_SPEC_H_INCLUDED #include "hash-map.h" @@ -146,4 +146,4 @@ typedef hash_map<location_hash, nowarn_spec_t> nowarn_map_t; /* A mapping from a 'location_t' to the warning spec set for it. */ extern GTY(()) nowarn_map_t *nowarn_map; -#endif // DIAGNOSTIC_SPEC_H_INCLUDED +#endif // GCC_DIAGNOSTIC_SPEC_H_INCLUDED diff --git a/gcc/gengtype.cc b/gcc/gengtype.cc index 6a3621c96cd1..84c763620472 100644 --- a/gcc/gengtype.cc +++ b/gcc/gengtype.cc @@ -1722,7 +1722,7 @@ open_base_files (void) "target-globals.h", "ipa-ref.h", "cgraph.h", "symbol-summary.h", "sreal.h", "ipa-cp.h", "ipa-prop.h", "ipa-fnsummary.h", "dwarf2out.h", "omp-general.h", "omp-offload.h", "ipa-modref-tree.h", "ipa-modref.h", - "symtab-thunks.h", "symtab-clones.h", "diagnostic-spec.h", "ctfc.h", + "symtab-thunks.h", "symtab-clones.h", "gcc-diagnostic-spec.h", "ctfc.h", NULL }; const char *const *ifp; diff --git a/gcc/warning-control.cc b/gcc/warning-control.cc index 48446a772e9d..e04ef69fcf4c 100644 --- a/gcc/warning-control.cc +++ b/gcc/warning-control.cc @@ -28,7 +28,7 @@ #include "gimple.h" #include "cgraph.h" #include "hash-map.h" -#include "diagnostic-spec.h" +#include "gcc-diagnostic-spec.h" /* Return the no-warning bit for EXPR. */ -- 2.26.3