+2017-12-07 Richard Sandiford <richard.sandiford@linaro.org>
+
+ * tree.c (build_vector): Delete.
+ * tree.h (build_vector): Make static and move into the self-testing
+ block.
+
2017-12-07 Richard Sandiford <richard.sandiford@linaro.org>
* vector-builder.h (vector_builder::derived): New const overload.
return t;
}
-/* 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. */
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
extern tree build_int_cstu (tree type, unsigned HOST_WIDE_INT cst);
extern tree build_int_cst_type (tree, HOST_WIDE_INT);
extern tree make_vector (unsigned, unsigned CXX_MEM_STAT_INFO);
-extern tree build_vector (tree, vec<tree> CXX_MEM_STAT_INFO);
extern tree build_vector_from_ctor (tree, vec<constructor_elt, va_gc> *);
extern tree build_vector_from_val (tree, tree);
extern void recompute_constructor_flags (tree);