Commit 7b1bd3c5 by Richard Henderson Committed by Richard Henderson

hooks.c (hook_bool_void_false, [...]): Rename so that the return type is first.

        * hooks.c (hook_bool_void_false, hook_void_tree_int,
        hook_void_FILEptr_constcharptr): Rename so that the return
        type is first.
        (hook_int_tree_tree_1, hook_void_tree, hook_void_tree_treeptr,
        hook_bool_tree_false): New.
        * hooks.h: Update.
        * langhooks-def.h: Update for renames.
        * target-def.h: Likewise.
        * tree.c (default_comp_type_attributes,
        default_set_default_type_attributes, default_insert_attributes,
        default_function_attribute_inlinable_p,
        default_ms_bitfield_layout_p): Remove.
        * tree.h: Update.

From-SVN: r59556
parent 44571d6e
2002-11-26 Richard Henderson <rth@redhat.com>
* hooks.c (hook_bool_void_false, hook_void_tree_int,
hook_void_FILEptr_constcharptr): Rename so that the return
type is first.
(hook_int_tree_tree_1, hook_void_tree, hook_void_tree_treeptr,
hook_bool_tree_false): New.
* hooks.h: Update.
* langhooks-def.h: Update for renames.
* target-def.h: Likewise.
* tree.c (default_comp_type_attributes,
default_set_default_type_attributes, default_insert_attributes,
default_function_attribute_inlinable_p,
default_ms_bitfield_layout_p): Remove.
* tree.h: Update.
2002-11-26 John David Anglin <dave@hiauly1.hia.nrc.ca>
* pa-protos.h (function_value): New prototype.
......
......@@ -34,22 +34,14 @@ hook_void_void ()
/* Generic hook that takes no arguments and returns false. */
bool
hook_void_bool_false ()
{
return false;
}
/* Generic hook that takes (tree) and returns false. */
bool
hook_tree_bool_false (a)
tree a ATTRIBUTE_UNUSED;
hook_bool_void_false ()
{
return false;
}
/* Generic hook that takes (tree, int) and does nothing. */
void
hook_tree_int_void (a, b)
hook_void_tree_int (a, b)
tree a ATTRIBUTE_UNUSED;
int b ATTRIBUTE_UNUSED;
{
......@@ -57,7 +49,7 @@ hook_tree_int_void (a, b)
/* Generic hook that takes (FILE *, const char *) and does nothing. */
void
hook_FILEptr_constcharptr_void (a, b)
hook_void_FILEptr_constcharptr (a, b)
FILE *a ATTRIBUTE_UNUSED;
const char *b ATTRIBUTE_UNUSED;
{
......@@ -93,3 +85,32 @@ default_can_output_mi_thunk_no_vcall (a, b, c, d)
{
return c == 0;
}
/* ??? Used for comp_type_attributes, which ought to return bool. */
int
hook_int_tree_tree_1 (a, b)
tree a ATTRIBUTE_UNUSED;
tree b ATTRIBUTE_UNUSED;
{
return 1;
}
void
hook_void_tree (a)
tree a ATTRIBUTE_UNUSED;
{
}
void
hook_void_tree_treeptr (a, b)
tree a ATTRIBUTE_UNUSED;
tree *b ATTRIBUTE_UNUSED;
{
}
bool
hook_bool_tree_false (a)
tree a ATTRIBUTE_UNUSED;
{
return false;
}
......@@ -22,16 +22,21 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef GCC_HOOKS_H
#define GCC_HOOKS_H
bool hook_void_bool_false PARAMS ((void));
bool hook_tree_bool_false PARAMS ((tree));
void hook_tree_int_void PARAMS ((tree, int));
void hook_void_void PARAMS ((void));
void hook_FILEptr_constcharptr_void PARAMS ((FILE *, const char *));
bool hook_bool_void_false PARAMS ((void));
bool hook_bool_tree_false PARAMS ((tree));
bool hook_bool_tree_hwi_hwi_tree_false
PARAMS ((tree, HOST_WIDE_INT, HOST_WIDE_INT, tree));
bool hook_bool_tree_hwi_hwi_tree_true
PARAMS ((tree, HOST_WIDE_INT, HOST_WIDE_INT, tree));
void hook_void_tree_int PARAMS ((tree, int));
void hook_void_void PARAMS ((void));
void hook_void_FILEptr_constcharptr PARAMS ((FILE *, const char *));
void hook_void_tree PARAMS ((tree));
void hook_void_tree_treeptr PARAMS ((tree, tree *));
int hook_int_tree_tree_1 PARAMS ((tree, tree));
bool default_can_output_mi_thunk_no_vcall
PARAMS ((tree, HOST_WIDE_INT, HOST_WIDE_INT, tree));
......
......@@ -90,7 +90,7 @@ tree lhd_tree_inlining_convert_parm_for_inlining PARAMS ((tree, tree, tree));
#define LANG_HOOKS_CLEAR_BINDING_STACK lhd_clear_binding_stack
#define LANG_HOOKS_INIT_OPTIONS lhd_do_nothing
#define LANG_HOOKS_DECODE_OPTION lhd_decode_option
#define LANG_HOOKS_POST_OPTIONS hook_void_bool_false
#define LANG_HOOKS_POST_OPTIONS hook_bool_void_false
#define LANG_HOOKS_GET_ALIAS_SET lhd_get_alias_set
#define LANG_HOOKS_EXPAND_CONSTANT lhd_return_tree
#define LANG_HOOKS_EXPAND_EXPR lhd_expand_expr
......@@ -141,7 +141,7 @@ tree lhd_tree_inlining_convert_parm_for_inlining PARAMS ((tree, tree, tree));
#define LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P \
lhd_tree_inlining_anon_aggr_type_p
#define LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P \
hook_tree_bool_false
hook_bool_tree_false
#define LANG_HOOKS_TREE_INLINING_START_INLINING \
lhd_tree_inlining_start_inlining
#define LANG_HOOKS_TREE_INLINING_END_INLINING \
......
......@@ -221,11 +221,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define TARGET_MERGE_DECL_ATTRIBUTES merge_decl_attributes
#define TARGET_MERGE_TYPE_ATTRIBUTES merge_type_attributes
#define TARGET_ATTRIBUTE_TABLE NULL
#define TARGET_COMP_TYPE_ATTRIBUTES default_comp_type_attributes
#define TARGET_SET_DEFAULT_TYPE_ATTRIBUTES default_set_default_type_attributes
#define TARGET_INSERT_ATTRIBUTES default_insert_attributes
#define TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P default_function_attribute_inlinable_p
#define TARGET_MS_BITFIELD_LAYOUT_P default_ms_bitfield_layout_p
/* In builtins.c. */
#define TARGET_INIT_BUILTINS default_init_builtins
......@@ -245,14 +240,19 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#endif
/* In hook.c. */
#define TARGET_CANNOT_MODIFY_JUMPS_P hook_void_bool_false
#define TARGET_CANNOT_MODIFY_JUMPS_P hook_bool_void_false
#define TARGET_COMP_TYPE_ATTRIBUTES hook_int_tree_tree_1
#define TARGET_SET_DEFAULT_TYPE_ATTRIBUTES hook_void_tree
#define TARGET_INSERT_ATTRIBUTES hook_void_tree_treeptr
#define TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P hook_bool_tree_false
#define TARGET_MS_BITFIELD_LAYOUT_P hook_bool_tree_false
#ifndef TARGET_IN_SMALL_DATA_P
#define TARGET_IN_SMALL_DATA_P hook_tree_bool_false
#define TARGET_IN_SMALL_DATA_P hook_bool_tree_false
#endif
#ifndef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO hook_tree_int_void
#define TARGET_ENCODE_SECTION_INFO hook_void_tree_int
#endif
/* The whole shebang. */
......
......@@ -2552,53 +2552,6 @@ build_type_attribute_variant (ttype, attribute)
return ttype;
}
/* Default value of targetm.comp_type_attributes that always returns 1. */
int
default_comp_type_attributes (type1, type2)
tree type1 ATTRIBUTE_UNUSED;
tree type2 ATTRIBUTE_UNUSED;
{
return 1;
}
/* Default version of targetm.set_default_type_attributes that always does
nothing. */
void
default_set_default_type_attributes (type)
tree type ATTRIBUTE_UNUSED;
{
}
/* Default version of targetm.insert_attributes that always does nothing. */
void
default_insert_attributes (decl, attr_ptr)
tree decl ATTRIBUTE_UNUSED;
tree *attr_ptr ATTRIBUTE_UNUSED;
{
}
/* Default value of targetm.function_attribute_inlinable_p that always
returns false. */
bool
default_function_attribute_inlinable_p (fndecl)
tree fndecl ATTRIBUTE_UNUSED;
{
/* By default, functions with machine attributes cannot be inlined. */
return false;
}
/* Default value of targetm.ms_bitfield_layout_p that always returns
false. */
bool
default_ms_bitfield_layout_p (record)
tree record ATTRIBUTE_UNUSED;
{
/* By default, GCC does not use the MS VC++ bitfield layout rules. */
return false;
}
/* Return nonzero if IDENT is a valid name for attribute ATTR,
or zero if not.
......
......@@ -2354,11 +2354,6 @@ enum attribute_flags
extern tree merge_decl_attributes PARAMS ((tree, tree));
extern tree merge_type_attributes PARAMS ((tree, tree));
extern int default_comp_type_attributes PARAMS ((tree, tree));
extern void default_set_default_type_attributes PARAMS ((tree));
extern void default_insert_attributes PARAMS ((tree, tree *));
extern bool default_function_attribute_inlinable_p PARAMS ((tree));
extern bool default_ms_bitfield_layout_p PARAMS ((tree));
struct cpp_reader;
extern void default_register_cpp_builtins PARAMS ((struct cpp_reader *));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment