The build is broken since
a3d3e8c362c2 since it's deleted the ability to pass
vec<> by value and now must be past by reference.
However some language hooks used by AArch64 were not updated and breaks the
build on AArch64. This patch updates these hooks.
gcc/c/ChangeLog:
* c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
* c-tree.h (c_simulate_enum_decl): Likewise.
gcc/ChangeLog:
* config/aarch64/aarch64-sve-builtins.cc (register_svpattern,
register_svprfop): Pass vec<> by pointer.
* langhooks-def.h (lhd_simulate_enum_decl): Likewise.
* langhooks.c (lhd_simulate_enum_decl): Likewise.
* langhooks.h (struct lang_hooks_for_types): Likewise.
gcc/cp/ChangeLog:
* cp-objcp-common.h (cxx_simulate_enum_decl): Pass vec<> by pointer.
* decl.c (cxx_simulate_enum_decl): Likewise.
tree
c_simulate_enum_decl (location_t loc, const char *name,
- vec<string_int_pair> values)
+ vec<string_int_pair> *values_ptr)
{
location_t saved_loc = input_location;
input_location = loc;
tree value_chain = NULL_TREE;
string_int_pair *value;
+ vec<string_int_pair> values = *values_ptr;
unsigned int i;
FOR_EACH_VEC_ELT (values, i, value)
{
extern tree finish_struct (location_t, tree, tree, tree,
class c_struct_parse_info *);
extern tree c_simulate_enum_decl (location_t, const char *,
- vec<string_int_pair>);
+ vec<string_int_pair> *);
extern struct c_arg_info *build_arg_info (void);
extern struct c_arg_info *get_parm_info (bool, tree);
extern tree grokfield (location_t, struct c_declarator *,
#undef PUSH
acle_svpattern = lang_hooks.types.simulate_enum_decl (input_location,
- "svpattern", values);
+ "svpattern", &values);
}
/* Register the svprfop enum. */
#undef PUSH
acle_svprfop = lang_hooks.types.simulate_enum_decl (input_location,
- "svprfop", values);
+ "svprfop", &values);
}
/* Implement #pragma GCC aarch64 "arm_sve.h". */
location_t, const struct cl_option_handlers *);
extern tree cxx_make_type_hook (tree_code);
extern tree cxx_simulate_enum_decl (location_t, const char *,
- vec<string_int_pair>);
+ vec<string_int_pair> *);
/* Lang hooks that are shared between C++ and ObjC++ are defined here. Hooks
specific to C++ or ObjC++ go in cp/cp-lang.c and objcp/objcp-lang.c,
tree
cxx_simulate_enum_decl (location_t loc, const char *name,
- vec<string_int_pair> values)
+ vec<string_int_pair> *values)
{
location_t saved_loc = input_location;
input_location = loc;
extern void lhd_overwrite_decl_assembler_name (tree decl, tree name);
extern bool lhd_warn_unused_global_decl (const_tree);
extern tree lhd_simulate_enum_decl (location_t, const char *,
- vec<string_int_pair>);
+ vec<string_int_pair> *);
extern tree lhd_type_for_size (unsigned precision, int unsignedp);
extern void lhd_incomplete_type_error (location_t, const_tree, const_tree);
extern tree lhd_type_promotes_to (tree);
might be reusable elsewhere. */
tree
lhd_simulate_enum_decl (location_t loc, const char *name,
- vec<string_int_pair> values)
+ vec<string_int_pair> *values_ptr)
{
tree enumtype = lang_hooks.types.make_type (ENUMERAL_TYPE);
tree enumdecl = build_decl (loc, TYPE_DECL, get_identifier (name), enumtype);
tree value_chain = NULL_TREE;
string_int_pair *value;
+ vec<string_int_pair> values = *values_ptr;
unsigned int i;
FOR_EACH_VEC_ELT (values, i, value)
{
/* Make an enum type with the given name and values, associating
them all with the given source location. */
- tree (*simulate_enum_decl) (location_t, const char *, vec<string_int_pair>);
+ tree (*simulate_enum_decl) (location_t, const char *, vec<string_int_pair> *);
/* Return what kind of RECORD_TYPE this is, mainly for purposes of
debug information. If not defined, record types are assumed to