From 397d1bed2f014416f0c287b7872d025fb8003705 Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Wed, 17 Aug 2016 10:13:20 -0400
Subject: [PATCH] input.c: move test functions within #CHECKING_P and into
selftest::
gcc/ChangeLog:
* input.c (get_source_range_for_char): Rename to...
(selftest::get_source_range_for_char): ...this, and move within
the #if CHECKING_P guard.
(get_num_source_ranges_for_substring): Rename to...
(selftest::get_num_source_ranges_for_substring): ...this, move within
the #if CHECKING_P guard, and make static.
---
gcc/input.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
@@ -1454,6 +1454,12 @@ get_source_location_for_substring (cpp_reader *pfile,
return NULL;
}
+#if CHECKING_P
+
+namespace selftest {
+
+/* Selftests of location handling. */
+
/* Attempt to populate *OUT_RANGE with source location information on the
given character within the string literal found at STRLOC.
CHAR_IDX refers to an offset within the execution character set.
@@ -1493,7 +1499,7 @@ get_source_range_for_char (cpp_reader *pfile,
/* As get_source_range_for_char, but write to *OUT the number
of ranges that are available. */
-const char *
+static const char *
get_num_source_ranges_for_substring (cpp_reader *pfile,
string_concat_db *concats,
location_t strloc,
@@ -1513,12 +1519,6 @@ get_num_source_ranges_for_substring (cpp_reader *pfile,
return NULL;
}
-#if CHECKING_P
-
-namespace selftest {
-
-/* Selftests of location handling. */
-
/* A class for writing out a temporary sourcefile for use in selftests
of input handling. */
--
1.8.5.3