+2013-05-09 Jason Merrill <jason@redhat.com>
+
+ * tree.c (build_constructor_va): New.
+ * tree.h: Declare it.
+
2013-05-09 Martin Jambor <mjambor@suse.cz>
PR lto/57084
return build_constructor (type, v);
}
+/* Return a new CONSTRUCTOR node whose type is TYPE. NELTS is the number
+ of elements, provided as index/value pairs. */
+
+tree
+build_constructor_va (tree type, int nelts, ...)
+{
+ vec<constructor_elt, va_gc> *v = NULL;
+ va_list p;
+
+ va_start (p, nelts);
+ vec_alloc (v, nelts);
+ while (nelts--)
+ {
+ tree index = va_arg (p, tree);
+ tree value = va_arg (p, tree);
+ CONSTRUCTOR_APPEND_ELT (v, index, value);
+ }
+ va_end (p);
+ return build_constructor (type, v);
+}
+
/* Return a new FIXED_CST node whose type is TYPE and value is F. */
tree
extern tree build_constructor (tree, vec<constructor_elt, va_gc> *);
extern tree build_constructor_single (tree, tree, tree);
extern tree build_constructor_from_list (tree, tree);
+extern tree build_constructor_va (tree, int, ...);
extern tree build_real_from_int_cst (tree, const_tree);
extern tree build_complex (tree, tree, tree);
extern tree build_one_cst (tree);