This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] *hooks.[ch]: Remove unused generic hooks.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 08 Feb 2004 08:32:25 -0500 (EST)
- Subject: [patch] *hooks.[ch]: Remove unused generic hooks.
Hi,
Attached is a patch to remove unused generic hooks.
IMHO, these hooks are so easy to write, so people can re-invent these
as needed.
Bootstrapped on i686-pc-linux-gnu. OK to apply?
Kazu Hirata
2004-02-08 Kazu Hirata <kazu@cs.umass.edu>
* hooks.c (hook_void_tree_int): Remove.
(hook_void_constcharptr): Likewise.
(hook_int_void_0): Likewise.
* hooks.h: Remove the prototypes for the above three
functions.
* targhooks.c (hook_bool_machine_mode_true): Remove.
* targhooks.h: Remove the prototype for
hook_bool_machine_mode_true.
Index: hooks.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/hooks.c,v
retrieving revision 1.23
diff -u -r1.23 hooks.c
--- hooks.c 23 Jan 2004 21:05:18 -0000 1.23
+++ hooks.c 7 Feb 2004 23:56:50 -0000
@@ -55,24 +55,12 @@
return false;
}
-
-/* Generic hook that takes (tree, int) and does nothing. */
-void
-hook_void_tree_int (tree a ATTRIBUTE_UNUSED, int b ATTRIBUTE_UNUSED)
-{
-}
-
/* Generic hook that takes (FILE *, const char *) and does nothing. */
void
hook_void_FILEptr_constcharptr (FILE *a ATTRIBUTE_UNUSED, const char *b ATTRIBUTE_UNUSED)
{
}
-void
-hook_void_constcharptr (const char *a ATTRIBUTE_UNUSED)
-{
-}
-
/* Used for the TARGET_ASM_CAN_OUTPUT_MI_THUNK hook. */
bool
hook_bool_tree_hwi_hwi_tree_false (tree a ATTRIBUTE_UNUSED,
@@ -117,12 +105,6 @@
int
hook_int_rtx_0 (rtx a ATTRIBUTE_UNUSED)
-{
- return 0;
-}
-
-int
-hook_int_void_0 (void)
{
return 0;
}
Index: hooks.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/hooks.h,v
retrieving revision 1.24
diff -u -r1.24 hooks.h
--- hooks.h 23 Jan 2004 21:05:18 -0000 1.24
+++ hooks.h 7 Feb 2004 23:56:50 -0000
@@ -35,16 +35,13 @@
extern bool hook_bool_rtx_int_int_intp_false (rtx, int, int, int *);
extern bool hook_bool_constcharptr_size_t_false (const char *, size_t);
-extern void hook_void_tree_int (tree, int);
extern void hook_void_void (void);
extern void hook_void_FILEptr_constcharptr (FILE *, const char *);
extern void hook_void_tree (tree);
extern void hook_void_tree_treeptr (tree, tree *);
-extern void hook_void_constcharptr (const char *);
extern int hook_int_tree_tree_1 (tree, tree);
extern int hook_int_rtx_0 (rtx);
-extern int hook_int_void_0 (void);
extern int hook_int_size_t_constcharptr_int_0 (size_t, const char *, int);
extern int hook_int_void_no_regs (void);
Index: targhooks.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/targhooks.c,v
retrieving revision 2.16
diff -u -r2.16 targhooks.c
--- targhooks.c 31 Jan 2004 22:12:55 -0000 2.16
+++ targhooks.c 7 Feb 2004 23:57:53 -0000
@@ -171,11 +171,3 @@
{
return true;
}
-
-/* Generic hook that takes a machine mode and returns true. */
-
-bool
-hook_bool_machine_mode_true (enum machine_mode a ATTRIBUTE_UNUSED)
-{
- return true;
-}
Index: targhooks.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/targhooks.h,v
retrieving revision 2.8
diff -u -r2.8 targhooks.h
--- targhooks.h 31 Jan 2004 22:12:55 -0000 2.8
+++ targhooks.h 7 Feb 2004 23:57:53 -0000
@@ -35,4 +35,3 @@
extern bool default_pretend_outgoing_varargs_named (CUMULATIVE_ARGS *);
extern bool hook_bool_CUMULATIVE_ARGS_true (CUMULATIVE_ARGS *);
-extern bool hook_bool_machine_mode_true (enum machine_mode);