The "gcc" subdirectory of our source tree currently contains a total
of almost 1000 .cc and .h files, enough to hit rate-limiting in some
git web UIs, and obscuring the logical relationships between subsystems.
In
r16-2211-ga5d9debedd2f46 I started introducing a
"namespace diagnostics" so it makes sense to move such code
into a new "gcc/diagnostics" subdirectory.
My intent is for the "diagnostics" namespace/directory to contain
shared parts of the diagnostics code that are in libcommon, in
particular which don't have knowledge of trees.
This patch begins moving of the existing code within
"namespace diagnostics" into a new "gcc/diagnostics" subdirectory.
No functional change intended.
renamed: gcc/diagnostic-digraphs.cc -> gcc/diagnostics/digraphs.cc
renamed: gcc/diagnostic-digraphs.h -> gcc/diagnostics/digraphs.h
renamed: gcc/diagnostic-state-to-dot.cc -> gcc/diagnostics/state-graphs-to-dot.cc
renamed: gcc/diagnostic-state-graphs.cc -> gcc/diagnostics/state-graphs.cc
renamed: gcc/diagnostic-state-graphs.h -> gcc/diagnostics/state-graphs.h
contrib/ChangeLog:
* gcc.doxy (INPUT): Add gcc/diagnostics subdir.
gcc/ChangeLog:
* Makefile.in (OBJS-libcommon): Rename diagnostic-digraphs.o to
diagnostics/digraphs.o. Rename diagnostic-state-graphs.o to
diagnostics/state-graphs.o. Rename diagnostic-state-to-dot.o to
diagnostics/state-graphs-to-dot.o.
(PLUGIN_HEADERS): Add $(srcdir)/diagnostics/*.h.
(install-plugin:): Likewise.
* configure: Regenerate.
* configure.ac (gccdepdir): Add "diagnostics" to directories.
* diagnostic-format-html.cc: Update #includes for move of
"diagnostic-digraphs.h" to "diagnostics/digraphs.h" and of
move of "diagnostic-state-graphs.h" to
"diagnostics/state-graphs.h".
* diagnostic-format-sarif.cc: Likewise.
* diagnostic-path.cc: Likewise for state-graphs.h
* diagnostic-digraphs.cc: Move...
* diagnostics/digraphs.cc: ...to here. Update #include
for renaming of digraphs.h.
(selftest::diagnostic_digraphs_cc_tests): Rename to...
(selftest::diagnostics_digraphs_cc_tests): ...this.
* diagnostic-digraphs.h: Move...
* diagnostics/digraphs.h: ...to here, updating header guard.
* diagnostic-state-to-dot.cc: Move...
* diagnostics/state-graphs-to-dot.cc: ...to here. Update #include
of state-graphs.h.
* diagnostic-state-graphs.cc: Move...
* diagnostics/state-graphs.cc: ...to here. Update #include
of state-graphs.h.
(selftest::diagnostic_state_graphs_cc_tests): Rename...
(selftest::diagnostics_state_graphs_cc_tests): ...to this.
* diagnostic-state-graphs.h: Move...
* diagnostics/state-graphs.h: ...to here, updating header guard.
* libgdiagnostics.cc: Update #includes for move of
"diagnostic-digraphs.h" to "diagnostics/digraphs.h" and of
move of "diagnostic-state-graphs.h" to
"diagnostics/state-graphs.h".
* selftest-run-tests.cc (selftest::run_tests): Update for
function renamings that reflect file renamings.
* selftest.h (selftest::diagnostic_digraphs_cc_tests): Rename
to...
(selftest::diagnostics_digraphs_cc_tests): ...this.
(selftest::diagnostic_state_graphs_cc_tests): Rename...
(selftest::diagnostics_state_graphs_cc_tests): ...to this.
gcc/analyzer/ChangeLog:
* ana-state-to-diagnostic-state.cc: Update #include for move of
"diagnostic-state-graphs.h" to "diagnostics/state-graphs.h".
* ana-state-to-diagnostic-state.h: Likewise.
* checker-event.cc: Likewise.
* checker-event.h: Update #include for move of
"diagnostic-digraphs.h" to "diagnostics/digraphs.h".
* program-state.cc: : Update #include for move of
"diagnostic-state-graphs.h" to "diagnostics/state-graphs.h".
gcc/testsuite/ChangeLog:
* gcc.dg/plugin/diagnostic_plugin_test_graphs.cc: Update #include
for move of "diagnostic-digraphs.h" to "diagnostics/digraphs.h".
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = gcc gcc/analyzer gcc/text-art
+INPUT = gcc gcc/analyzer gcc/diagnostics gcc/text-art
# This tag can be used to specify the character encoding of the source files that
# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default
diagnostic-format-sarif.o \
diagnostic-format-text.o \
diagnostic-global-context.o \
- diagnostic-digraphs.o \
diagnostic-macro-unwinding.o \
diagnostic-output-spec.o \
diagnostic-path.o \
diagnostic-path-output.o \
diagnostic-show-locus.o \
- diagnostic-state-graphs.o \
- diagnostic-state-to-dot.o \
+ diagnostics/digraphs.o \
+ diagnostics/state-graphs.o \
+ diagnostics/state-graphs-to-dot.o \
edit-context.o \
graphviz.o pex.o \
pretty-print.o intl.o \
hash-set.h dominance.h cfg.h cfgrtl.h cfganal.h cfgbuild.h cfgcleanup.h \
lcm.h cfgloopmanip.h file-prefix-map.h builtins.def $(INSN_ATTR_H) \
pass-instances.def params.list $(srcdir)/../include/gomp-constants.h \
- $(EXPR_H) $(srcdir)/analyzer/*.h
+ $(EXPR_H) $(srcdir)/analyzer/*.h $(srcdir)/diagnostics/*.h
# generate the 'build fragment' b-header-vars
s-header-vars: Makefile
fi; \
case $$path in \
"$(srcdir)"/analyzer/* \
+ | "$(srcdir)"/diagnostics/* \
| "$(srcdir)"/config/* | "$(srcdir)"/common/config/* \
| "$(srcdir)"/c-family/* | "$(srcdir)"/*.def ) \
base=`echo "$$path" | sed -e "s|$$srcdirstrip/||"`;; \
#define INCLUDE_SET
#include "analyzer/common.h"
-#include "diagnostic-state-graphs.h"
+#include "diagnostics/state-graphs.h"
#include "diagnostic-format-sarif.h"
#include "analyzer/region-model.h"
#ifndef GCC_ANALYZER_ANA_STATE_TO_DIAGNOSTIC_STATE_H
#define GCC_ANALYZER_ANA_STATE_TO_DIAGNOSTIC_STATE_H
-#include "diagnostic-state-graphs.h"
+#include "diagnostics/state-graphs.h"
#include "tree-logical-location.h"
namespace ana {
#include "inlining-iterator.h"
#include "tree-logical-location.h"
#include "diagnostic-format-sarif.h"
-#include "diagnostic-state-graphs.h"
+#include "diagnostics/state-graphs.h"
#include "analyzer/analyzer-logging.h"
#include "analyzer/sm.h"
#include "tree-logical-location.h"
#include "analyzer/program-state.h"
#include "analyzer/event-loc-info.h"
-#include "diagnostic-digraphs.h"
+#include "diagnostics/digraphs.h"
namespace ana {
#include "cgraph.h"
#include "digraph.h"
#include "diagnostic-event-id.h"
-#include "diagnostic-state-graphs.h"
+#include "diagnostics/state-graphs.h"
#include "graphviz.h"
#include "text-art/tree-widget.h"
"depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
"gccdepdir":C)
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/mkinstalldirs build/$DEPDIR
- for lang in $subdirs c-family common analyzer text-art rtl-ssa sym-exec
+ for lang in $subdirs c-family common analyzer diagnostics text-art rtl-ssa sym-exec
do
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/mkinstalldirs $lang/$DEPDIR
done ;;
ZW_CREATE_DEPDIR
AC_CONFIG_COMMANDS([gccdepdir],[
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/mkinstalldirs build/$DEPDIR
- for lang in $subdirs c-family common analyzer text-art rtl-ssa sym-exec
+ for lang in $subdirs c-family common analyzer diagnostics text-art rtl-ssa sym-exec
do
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/mkinstalldirs $lang/$DEPDIR
done], [subdirs="$subdirs" ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR])
#include "intl.h"
#include "xml.h"
#include "xml-printer.h"
-#include "diagnostic-digraphs.h"
-#include "diagnostic-state-graphs.h"
+#include "diagnostics/digraphs.h"
+#include "diagnostics/state-graphs.h"
#include "graphviz.h"
#include "json.h"
#include "selftest-xml.h"
#include "coretypes.h"
#include "diagnostic.h"
#include "diagnostic-metadata.h"
-#include "diagnostic-digraphs.h"
-#include "diagnostic-state-graphs.h"
+#include "diagnostics/digraphs.h"
+#include "diagnostics/state-graphs.h"
#include "diagnostic-path.h"
#include "diagnostic-format.h"
#include "diagnostic-buffer.h"
#include "coretypes.h"
#include "diagnostic.h"
#include "diagnostic-path.h"
-#include "diagnostic-state-graphs.h"
+#include "diagnostics/state-graphs.h"
/* Disable warnings about missing quoting in GCC diagnostics for the print
calls below. */
#include "coretypes.h"
#include "graphviz.h"
-#include "diagnostic-digraphs.h"
+#include "diagnostics/digraphs.h"
#include "diagnostic-format-sarif.h"
#include "selftest.h"
/* Run all of the selftests within this file. */
void
-diagnostic_digraphs_cc_tests ()
+diagnostics_digraphs_cc_tests ()
{
test_empty_graph ();
test_simple_graph ();
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-#ifndef GCC_DIAGNOSTIC_DIGRAPHS_H
-#define GCC_DIAGNOSTIC_DIGRAPHS_H
+#ifndef GCC_DIAGNOSTICS_DIGRAPHS_H
+#define GCC_DIAGNOSTICS_DIGRAPHS_H
#include "json.h"
#include "logical-location.h"
} // namespace digraphs
} // namespace diagnostics
-#endif /* ! GCC_DIAGNOSTIC_DIGRAPHS_H */
+#endif /* ! GCC_DIAGNOSTICS_DIGRAPHS_H */
#include "system.h"
#include "coretypes.h"
-#include "diagnostic-state-graphs.h"
+#include "diagnostics/state-graphs.h"
#include "graphviz.h"
#include "xml.h"
#include "xml-printer.h"
#include "system.h"
#include "coretypes.h"
-#include "diagnostic-state-graphs.h"
+#include "diagnostics/state-graphs.h"
#include "graphviz.h"
#include "xml.h"
#include "xml-printer.h"
/* Run all of the selftests within this file. */
void
-diagnostic_state_graphs_cc_tests ()
+diagnostics_state_graphs_cc_tests ()
{
test_node_attrs ();
}
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-#ifndef GCC_DIAGNOSTIC_STATE_GRAPHS_H
-#define GCC_DIAGNOSTIC_STATE_GRAPHS_H
+#ifndef GCC_DIAGNOSTICS_STATE_GRAPHS_H
+#define GCC_DIAGNOSTICS_STATE_GRAPHS_H
-#include "diagnostic-digraphs.h"
+#include "diagnostics/digraphs.h"
#include "logical-location.h"
/* diagnostics::digraphs provides support for directed graphs.
} // namespace state_graphs
} // namespace diagnostics
-#endif /* ! GCC_DIAGNOSTIC_STATE_GRAPHS_H */
+#endif /* ! GCC_DIAGNOSTICS_STATE_GRAPHS_H */
#include "diagnostic-format-sarif.h"
#include "diagnostic-format-text.h"
#include "diagnostic-output-spec.h"
-#include "diagnostic-digraphs.h"
-#include "diagnostic-state-graphs.h"
+#include "diagnostics/digraphs.h"
+#include "diagnostics/state-graphs.h"
#include "logical-location.h"
#include "edit-context.h"
#include "libgdiagnostics.h"
diagnostic_show_locus_cc_tests ();
diagnostic_format_html_cc_tests ();
diagnostic_format_sarif_cc_tests ();
- diagnostic_digraphs_cc_tests ();
+ diagnostics_digraphs_cc_tests ();
diagnostic_output_spec_cc_tests ();
- diagnostic_state_graphs_cc_tests ();
+ diagnostics_state_graphs_cc_tests ();
edit_context_cc_tests ();
fold_const_cc_tests ();
spellcheck_cc_tests ();
extern void convert_cc_tests ();
extern void dbgcnt_cc_tests ();
extern void diagnostic_color_cc_tests ();
-extern void diagnostic_digraphs_cc_tests ();
extern void diagnostic_format_html_cc_tests ();
extern void diagnostic_format_sarif_cc_tests ();
extern void diagnostic_output_spec_cc_tests ();
extern void diagnostic_path_output_cc_tests ();
extern void diagnostic_show_locus_cc_tests ();
-extern void diagnostic_state_graphs_cc_tests ();
+extern void diagnostics_digraphs_cc_tests ();
+extern void diagnostics_state_graphs_cc_tests ();
extern void digraph_cc_tests ();
extern void dumpfile_cc_tests ();
extern void edit_context_cc_tests ();
#include "context.h"
#include "gcc-rich-location.h"
#include "diagnostic-metadata.h"
-#include "diagnostic-digraphs.h"
+#include "diagnostics/digraphs.h"
#include "pass_manager.h"