https://gcc.gnu.org/g:524cdf4dab610e6e53b3b033eacbdb1a03687cc7

commit r15-1416-g524cdf4dab610e6e53b3b033eacbdb1a03687cc7
Author: David Malcolm <dmalc...@redhat.com>
Date:   Tue Jun 18 10:59:56 2024 -0400

    diagnostics: rename tree-diagnostic-path.cc to diagnostic-path.cc
    
    Now that nothing in tree-diagnostic-path.cc uses "tree", this patch
    renames it to diagnostic-path.cc and moves it from OBJS to
    OBJS-libcommon.
    
    No functional change intended.
    
    gcc/ChangeLog:
            * Makefile.in (OBJS): Move selftest-diagnostic-path.o,
            selftest-logical-location.o, and tree-diagnostic-path.o to...
            (OBJS-libcommon): ...here, renaming tree-diagnostic-path.o to
            diagnostic-path.o.
            * tree-diagnostic-path.cc: Rename to...
            * diagnostic-path.cc: ...this.  Drop include of "tree.h".
            (tree_diagnostic_path_cc_tests): Rename to...
            (diagnostic_path_cc_tests): ...this.
            * selftest-run-tests.cc (selftest::run_tests): Update for above
            renaming.
            * selftest.h (tree_diagnostic_path_cc_tests): Rename decl to...
            (diagnostic_path_cc_tests): ...this.
    
    Signed-off-by: David Malcolm <dmalc...@redhat.com>

Diff:
---
 gcc/Makefile.in                                     | 6 +++---
 gcc/{tree-diagnostic-path.cc => diagnostic-path.cc} | 3 +--
 gcc/selftest-run-tests.cc                           | 2 +-
 gcc/selftest.h                                      | 2 +-
 4 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index e701d9fb0829..638ea6b2307b 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1700,8 +1700,6 @@ OBJS = \
        ubsan.o \
        sanopt.o \
        sancov.o \
-       selftest-diagnostic-path.o \
-       selftest-logical-location.o \
        simple-diagnostic-path.o \
        tree-call-cdce.o \
        tree-cfg.o \
@@ -1712,7 +1710,6 @@ OBJS = \
        tree-dfa.o \
        tree-diagnostic.o \
        tree-diagnostic-client-data-hooks.o \
-       tree-diagnostic-path.o \
        tree-dump.o \
        tree-eh.o \
        tree-emutls.o \
@@ -1827,6 +1824,7 @@ OBJS-libcommon = diagnostic-spec.o diagnostic.o 
diagnostic-color.o \
        diagnostic-format-json.o \
        diagnostic-format-sarif.o \
        diagnostic-macro-unwinding.o \
+       diagnostic-path.o \
        diagnostic-show-locus.o \
        edit-context.o \
        pretty-print.o intl.o \
@@ -1834,6 +1832,8 @@ OBJS-libcommon = diagnostic-spec.o diagnostic.o 
diagnostic-color.o \
        sbitmap.o \
        vec.o input.o hash-table.o ggc-none.o memory-block.o \
        selftest.o selftest-diagnostic.o sort.o \
+       selftest-diagnostic-path.o \
+       selftest-logical-location.o \
        text-art/box-drawing.o \
        text-art/canvas.o \
        text-art/ruler.o \
diff --git a/gcc/tree-diagnostic-path.cc b/gcc/diagnostic-path.cc
similarity index 99%
rename from gcc/tree-diagnostic-path.cc
rename to gcc/diagnostic-path.cc
index 35f8ea2b8b62..882dc1c5805f 100644
--- a/gcc/tree-diagnostic-path.cc
+++ b/gcc/diagnostic-path.cc
@@ -25,7 +25,6 @@ along with GCC; see the file COPYING3.  If not see
 #define INCLUDE_VECTOR
 #include "system.h"
 #include "coretypes.h"
-#include "tree.h"
 #include "diagnostic.h"
 #include "diagnostic-macro-unwinding.h"
 #include "intl.h"
@@ -2199,7 +2198,7 @@ control_flow_tests (const line_table_case &case_)
 /* Run all of the selftests within this file.  */
 
 void
-tree_diagnostic_path_cc_tests ()
+diagnostic_path_cc_tests ()
 {
   /* In a few places we use the global dc's printer to determine
      colorization so ensure this off during the tests.  */
diff --git a/gcc/selftest-run-tests.cc b/gcc/selftest-run-tests.cc
index 3275db38ba92..e6779206c470 100644
--- a/gcc/selftest-run-tests.cc
+++ b/gcc/selftest-run-tests.cc
@@ -102,7 +102,7 @@ selftest::run_tests ()
   spellcheck_cc_tests ();
   spellcheck_tree_cc_tests ();
   tree_cfg_cc_tests ();
-  tree_diagnostic_path_cc_tests ();
+  diagnostic_path_cc_tests ();
   simple_diagnostic_path_cc_tests ();
   attribs_cc_tests ();
 
diff --git a/gcc/selftest.h b/gcc/selftest.h
index 2d1aa91607e3..dcb1463ed906 100644
--- a/gcc/selftest.h
+++ b/gcc/selftest.h
@@ -222,6 +222,7 @@ extern void cgraph_cc_tests ();
 extern void convert_cc_tests ();
 extern void diagnostic_color_cc_tests ();
 extern void diagnostic_format_json_cc_tests ();
+extern void diagnostic_path_cc_tests ();
 extern void diagnostic_show_locus_cc_tests ();
 extern void digraph_cc_tests ();
 extern void dumpfile_cc_tests ();
@@ -259,7 +260,6 @@ extern void sreal_cc_tests ();
 extern void store_merging_cc_tests ();
 extern void tree_cc_tests ();
 extern void tree_cfg_cc_tests ();
-extern void tree_diagnostic_path_cc_tests ();
 extern void tristate_cc_tests ();
 extern void typed_splay_tree_cc_tests ();
 extern void vec_cc_tests ();

Reply via email to