From: Richard Kenner Date: Mon, 5 Jul 2004 14:22:28 +0000 (+0000) Subject: function.c, [...]: Move max_size hook to type hooks; remove bogus PARAMS. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8963a5172c0a91b190f361ef3b400518ee347a00;p=gcc.git function.c, [...]: Move max_size hook to type hooks; remove bogus PARAMS. * function.c, langhooks-def.h, langhooks.h: Move max_size hook to type hooks; remove bogus PARAMS. From-SVN: r84113 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 33b69c2f3a6..c2dd100ed31 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-07-05 Richard Kenner + + * function.c, langhooks-def.h, langhooks.h: Move max_size hook + to type hooks; remove bogus PARAMS. + 2004-07-05 Nathan Sidwell * c-tree.h (TYPE_ACTUAL_ARG_TYPES): Use TYPE_LANG_SLOT_1. diff --git a/gcc/function.c b/gcc/function.c index 5afb046677c..71003c2d61b 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -852,7 +852,7 @@ assign_temp (tree type_or_decl, int keep, int memory_required, /* If we still haven't been able to get a size, see if the language can compute a maximum size. */ if (size == -1 - && (size_tree = lang_hooks.type_max_size (type)) != 0 + && (size_tree = lang_hooks.types.max_size (type)) != 0 && host_integerp (size_tree, 1)) size = tree_low_cst (size_tree, 1); diff --git a/gcc/langhooks-def.h b/gcc/langhooks-def.h index 2cbd3fd2d14..da8b6081e54 100644 --- a/gcc/langhooks-def.h +++ b/gcc/langhooks-def.h @@ -127,7 +127,6 @@ extern int lhd_gimplify_expr (tree *, tree *, tree *); #define LANG_HOOKS_DECL_PRINTABLE_NAME lhd_decl_printable_name #define LANG_HOOKS_GET_CALLEE_FNDECL lhd_return_null_tree #define LANG_HOOKS_EXPR_SIZE lhd_expr_size -#define LANG_HOOKS_TYPE_MAX_SIZE lhd_return_null_tree #define LANG_HOOKS_TREE_SIZE lhd_tree_size #define LANG_HOOKS_TYPES_COMPATIBLE_P lhd_types_compatible_p #define LANG_HOOKS_UPDATE_DECL_AFTER_SAVING NULL @@ -223,6 +222,7 @@ extern tree lhd_make_node (enum tree_code); #define LANG_HOOKS_INCOMPLETE_TYPE_ERROR lhd_incomplete_type_error #define LANG_HOOKS_TYPE_PROMOTES_TO lhd_type_promotes_to #define LANG_HOOKS_REGISTER_BUILTIN_TYPE lhd_register_builtin_type +#define LANG_HOOKS_TYPE_MAX_SIZE lhd_return_null_tree #define LANG_HOOKS_HASH_TYPES true #define LANG_HOOKS_FOR_TYPES_INITIALIZER { \ @@ -235,6 +235,7 @@ extern tree lhd_make_node (enum tree_code); LANG_HOOKS_TYPE_PROMOTES_TO, \ LANG_HOOKS_REGISTER_BUILTIN_TYPE, \ LANG_HOOKS_INCOMPLETE_TYPE_ERROR, \ + LANG_HOOKS_TYPE_MAX_SIZE, \ LANG_HOOKS_HASH_TYPES \ } @@ -306,7 +307,6 @@ extern tree lhd_make_node (enum tree_code); LANG_HOOKS_GET_CALLEE_FNDECL, \ LANG_HOOKS_PRINT_ERROR_FUNCTION, \ LANG_HOOKS_EXPR_SIZE, \ - LANG_HOOKS_TYPE_MAX_SIZE, \ LANG_HOOKS_UPDATE_DECL_AFTER_SAVING, \ LANG_HOOKS_ATTRIBUTE_TABLE, \ LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, \ diff --git a/gcc/langhooks.h b/gcc/langhooks.h index 6f526ef898d..895d94b16d8 100644 --- a/gcc/langhooks.h +++ b/gcc/langhooks.h @@ -141,6 +141,10 @@ struct lang_hooks_for_types invalid. */ void (*incomplete_type_error) (tree value, tree type); + /* Called from assign_temp to return the maximum size, if there is one, + for a type. */ + tree (*max_size) (tree); + /* Nonzero if types that are identical are to be hashed so that only one copy is kept. If a language requires unique types for each user-specified type, such as Ada, this should be set to TRUE. */ @@ -390,10 +394,6 @@ struct lang_hooks semantics in cases that it doesn't want to handle specially. */ tree (*expr_size) (tree); - /* Called from assign_temp to return the maximum size, if there is one, - for a type. */ - tree (*type_max_size) PARAMS ((tree)); - /* Update lang specific fields after duplicating function body. */ void (*update_decl_after_saving) (tree, void *);