xref: /openbsd-src/gnu/usr.bin/gcc/gcc/hooks.c (revision 4e43c760ad4cd5f644ec700462679d05749498d8)
1 /* General-purpose hooks.
2    Copyright (C) 2002, 2004 Free Software Foundation, Inc.
3 
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License as published by the
6 Free Software Foundation; either version 2, or (at your option) any
7 later version.
8 
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 GNU General Public License for more details.
13 
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 
18  In other words, you are welcome to use, share and improve this program.
19  You are forbidden to forbid anyone else to use, share and improve
20  what you give them.   Help stamp out software-hoarding!  */
21 
22 /* This file contains generic hooks that can be used as defaults for
23    target or language-dependent hook initializers.  */
24 
25 #include "config.h"
26 #include "system.h"
27 #include "hooks.h"
28 
29 /* Generic hook that does absolutely zappo.  */
30 void
hook_void_void()31 hook_void_void ()
32 {
33 }
34 
35 /* Generic hook that takes no arguments and returns false.  */
36 bool
hook_bool_void_false()37 hook_bool_void_false ()
38 {
39   return false;
40 }
41 
42 /* Generic hook that takes (tree, int) and does nothing.  */
43 void
hook_void_tree_int(a,b)44 hook_void_tree_int (a, b)
45      tree a ATTRIBUTE_UNUSED;
46      int b ATTRIBUTE_UNUSED;
47 {
48 }
49 
50 /* Generic hook that takes (FILE *, const char *) and does nothing.  */
51 void
hook_void_FILEptr_constcharptr(a,b)52 hook_void_FILEptr_constcharptr (a, b)
53      FILE *a ATTRIBUTE_UNUSED;
54      const char *b ATTRIBUTE_UNUSED;
55 {
56 }
57 
58 /* Used for the TARGET_ASM_CAN_OUTPUT_MI_THUNK hook.  */
59 bool
hook_bool_tree_hwi_hwi_tree_false(a,b,c,d)60 hook_bool_tree_hwi_hwi_tree_false (a, b, c, d)
61      tree a ATTRIBUTE_UNUSED;
62      HOST_WIDE_INT b ATTRIBUTE_UNUSED;
63      HOST_WIDE_INT c ATTRIBUTE_UNUSED;
64      tree d ATTRIBUTE_UNUSED;
65 {
66   return false;
67 }
68 
69 bool
hook_bool_tree_hwi_hwi_tree_true(a,b,c,d)70 hook_bool_tree_hwi_hwi_tree_true (a, b, c, d)
71      tree a ATTRIBUTE_UNUSED;
72      HOST_WIDE_INT b ATTRIBUTE_UNUSED;
73      HOST_WIDE_INT c ATTRIBUTE_UNUSED;
74      tree d ATTRIBUTE_UNUSED;
75 {
76   return true;
77 }
78 
79 bool
default_can_output_mi_thunk_no_vcall(a,b,c,d)80 default_can_output_mi_thunk_no_vcall (a, b, c, d)
81      tree a ATTRIBUTE_UNUSED;
82      HOST_WIDE_INT b ATTRIBUTE_UNUSED;
83      HOST_WIDE_INT c;
84      tree d ATTRIBUTE_UNUSED;
85 {
86   return c == 0;
87 }
88 
89 /* ??? Used for comp_type_attributes, which ought to return bool.  */
90 int
hook_int_tree_tree_1(a,b)91 hook_int_tree_tree_1 (a, b)
92      tree a ATTRIBUTE_UNUSED;
93      tree b ATTRIBUTE_UNUSED;
94 {
95   return 1;
96 }
97 
98 void
hook_void_tree(a)99 hook_void_tree (a)
100      tree a ATTRIBUTE_UNUSED;
101 {
102 }
103 
104 void
hook_void_tree_treeptr(a,b)105 hook_void_tree_treeptr (a, b)
106      tree a ATTRIBUTE_UNUSED;
107      tree *b ATTRIBUTE_UNUSED;
108 {
109 }
110 
111 bool
hook_bool_tree_false(a)112 hook_bool_tree_false (a)
113      tree a ATTRIBUTE_UNUSED;
114 {
115   return false;
116 }
117 
118 bool
hook_bool_rtx_false(a)119 hook_bool_rtx_false (a)
120      rtx a ATTRIBUTE_UNUSED;
121 {
122   return false;
123 }
124 
125 bool
hook_bool_uintp_uintp_false(a,b)126 hook_bool_uintp_uintp_false (a, b)
127      unsigned int *a ATTRIBUTE_UNUSED;
128      unsigned int *b ATTRIBUTE_UNUSED;
129 {
130   return false;
131 }
132