aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-12-07 18:42:14 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2017-12-07 18:42:14 +0000
commit44e1aae4dbd8198a26ab0ec5958e073e2c9cc772 (patch)
tree60d257d4b662ae91e722b64dc3cda843d9e6d11a /gcc/tree.c
parentabe73c3d32b68809628eaa3266bf98cb7352851c (diff)
downloadgcc-44e1aae4dbd8198a26ab0ec5958e073e2c9cc772.zip
gcc-44e1aae4dbd8198a26ab0ec5958e073e2c9cc772.tar.gz
gcc-44e1aae4dbd8198a26ab0ec5958e073e2c9cc772.tar.bz2
Make build_vector static
The only remaining uses of build_vector are in the selftests in tree.c. This patch makes it static and moves it to the selftest part of the file. 2017-12-07 Richard Sandiford <richard.sandiford@linaro.org> gcc/ * tree.c (build_vector): Delete. * tree.h (build_vector): Make static and move into the self-testing block. From-SVN: r255479
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index e696d03..13ae1c9 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -1736,18 +1736,6 @@ make_vector (unsigned log2_npatterns,
}
/* Return a new VECTOR_CST node whose type is TYPE and whose values
- are given by VALS. */
-
-tree
-build_vector (tree type, vec<tree> vals MEM_STAT_DECL)
-{
- gcc_assert (vals.length () == TYPE_VECTOR_SUBPARTS (type));
- tree_vector_builder builder (type, vals.length (), 1);
- builder.splice (vals);
- return builder.build ();
-}
-
-/* Return a new VECTOR_CST node whose type is TYPE and whose values
are extracted from V, a vector of CONSTRUCTOR_ELT. */
tree
@@ -14066,6 +14054,18 @@ test_labels ()
ASSERT_FALSE (FORCED_LABEL (label_decl));
}
+/* Return a new VECTOR_CST node whose type is TYPE and whose values
+ are given by VALS. */
+
+static tree
+build_vector (tree type, vec<tree> vals MEM_STAT_DECL)
+{
+ gcc_assert (vals.length () == TYPE_VECTOR_SUBPARTS (type));
+ tree_vector_builder builder (type, vals.length (), 1);
+ builder.splice (vals);
+ return builder.build ();
+}
+
/* Check that VECTOR_CST ACTUAL contains the elements in EXPECTED. */
static void