* function.c, langhooks-def.h, langhooks.h: Move max_size hook
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Jul 2004 14:22:28 +0000 (14:22 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Jul 2004 14:22:28 +0000 (14:22 +0000)
to type hooks; remove bogus PARAMS.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84113 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/function.c
gcc/langhooks-def.h
gcc/langhooks.h

index 33b69c2..c2dd100 100644 (file)
@@ -1,3 +1,8 @@
+2004-07-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+
+       * function.c, langhooks-def.h, langhooks.h: Move max_size hook
+       to type hooks; remove bogus PARAMS.
+
 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
 
        * c-tree.h (TYPE_ACTUAL_ARG_TYPES): Use TYPE_LANG_SLOT_1.
index 5afb046..71003c2 100644 (file)
@@ -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);
 
index 2cbd3fd..da8b608 100644 (file)
@@ -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, \
index 6f526ef..895d94b 100644 (file)
@@ -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 *);