Daily bump.
[official-gcc.git] / gcc / langhooks-def.h
blobbb00b501cc6ceb92aa30cbb2bf3c9ed18cecc45a
1 /* Default macros to initialize the lang_hooks data structure.
2 Copyright 2001 Free Software Foundation, Inc.
3 Contributed by Alexandre Oliva <aoliva@redhat.com>
5 This file is part of GNU CC.
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
22 #ifndef GCC_LANG_HOOKS_DEF_H
23 #define GCC_LANG_HOOKS_DEF_H
25 #include "hooks.h"
27 /* Provide a hook routine for alias sets that always returns 1. This is
28 used by languages that haven't deal with alias sets yet. */
29 extern HOST_WIDE_INT hook_get_alias_set_0 PARAMS ((tree));
31 /* Note to creators of new hooks:
33 The macros in this file should NOT be surrounded by a
34 #ifdef...#endif pair, since this file declares the defaults. Each
35 front end overrides any hooks it wishes to, in the file containing
36 its struct lang_hooks, AFTER including this file.
38 Prefix all default hooks with "lhd_". */
40 /* See langhooks.h for the definition and documentation of each hook. */
42 extern void lhd_do_nothing PARAMS ((void));
43 extern int lhd_decode_option PARAMS ((int, char **));
44 extern HOST_WIDE_INT lhd_get_alias_set PARAMS ((tree));
45 extern tree lhd_return_tree PARAMS ((tree));
46 extern int lhd_safe_from_p PARAMS ((rtx, tree));
47 extern int lhd_staticp PARAMS ((tree));
48 extern void lhd_clear_binding_stack PARAMS ((void));
49 extern void lhd_print_tree_nothing PARAMS ((FILE *, tree, int));
50 extern void lhd_set_yydebug PARAMS ((int));
52 /* Declarations of default tree inlining hooks. */
53 tree lhd_tree_inlining_walk_subtrees PARAMS ((tree *, int *,
54 walk_tree_fn,
55 void *, void *));
56 int lhd_tree_inlining_cannot_inline_tree_fn PARAMS ((tree *));
57 int lhd_tree_inlining_disregard_inline_limits PARAMS ((tree));
58 tree lhd_tree_inlining_add_pending_fn_decls PARAMS ((void *, tree));
59 int lhd_tree_inlining_tree_chain_matters_p PARAMS ((tree));
60 int lhd_tree_inlining_auto_var_in_fn_p PARAMS ((tree, tree));
61 tree lhd_tree_inlining_copy_res_decl_for_inlining PARAMS ((tree, tree,
62 tree, void *,
63 int *, void *));
64 int lhd_tree_inlining_anon_aggr_type_p PARAMS ((tree));
65 int lhd_tree_inlining_start_inlining PARAMS ((tree));
66 void lhd_tree_inlining_end_inlining PARAMS ((tree));
67 tree lhd_tree_inlining_convert_parm_for_inlining PARAMS ((tree, tree, tree));
69 #define LANG_HOOKS_NAME "GNU unknown"
70 #define LANG_HOOKS_IDENTIFIER_SIZE sizeof (struct lang_identifier)
71 #define LANG_HOOKS_INIT lhd_do_nothing
72 #define LANG_HOOKS_FINISH lhd_do_nothing
73 #define LANG_HOOKS_CLEAR_BINDING_STACK lhd_clear_binding_stack
74 #define LANG_HOOKS_INIT_OPTIONS lhd_do_nothing
75 #define LANG_HOOKS_DECODE_OPTION lhd_decode_option
76 #define LANG_HOOKS_POST_OPTIONS hook_void_void
77 #define LANG_HOOKS_GET_ALIAS_SET lhd_get_alias_set
78 #define LANG_HOOKS_EXPAND_CONSTANT lhd_return_tree
79 #define LANG_HOOKS_SAFE_FROM_P lhd_safe_from_p
80 #define LANG_HOOKS_STATICP lhd_staticp
81 #define LANG_HOOKS_HONOR_READONLY false
82 #define LANG_HOOKS_PRINT_STATISTICS lhd_do_nothing
83 #define LANG_HOOKS_PRINT_XNODE lhd_print_tree_nothing
84 #define LANG_HOOKS_PRINT_DECL lhd_print_tree_nothing
85 #define LANG_HOOKS_PRINT_TYPE lhd_print_tree_nothing
86 #define LANG_HOOKS_PRINT_IDENTIFIER lhd_print_tree_nothing
87 #define LANG_HOOKS_SET_YYDEBUG lhd_set_yydebug
89 /* Tree inlining hooks. */
90 #define LANG_HOOKS_TREE_INLINING_WALK_SUBTREES lhd_tree_inlining_walk_subtrees
91 #define LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN \
92 lhd_tree_inlining_cannot_inline_tree_fn
93 #define LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS \
94 lhd_tree_inlining_disregard_inline_limits
95 #define LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS \
96 lhd_tree_inlining_add_pending_fn_decls
97 #define LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P \
98 lhd_tree_inlining_tree_chain_matters_p
99 #define LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P \
100 lhd_tree_inlining_auto_var_in_fn_p
101 #define LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING \
102 lhd_tree_inlining_copy_res_decl_for_inlining
103 #define LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P \
104 lhd_tree_inlining_anon_aggr_type_p
105 #define LANG_HOOKS_TREE_INLINING_START_INLINING \
106 lhd_tree_inlining_start_inlining
107 #define LANG_HOOKS_TREE_INLINING_END_INLINING \
108 lhd_tree_inlining_end_inlining
109 #define LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING \
110 lhd_tree_inlining_convert_parm_for_inlining
112 #define LANG_HOOKS_TREE_INLINING_INITIALIZER { \
113 LANG_HOOKS_TREE_INLINING_WALK_SUBTREES, \
114 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN, \
115 LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS, \
116 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS, \
117 LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P, \
118 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P, \
119 LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING, \
120 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P, \
121 LANG_HOOKS_TREE_INLINING_START_INLINING, \
122 LANG_HOOKS_TREE_INLINING_END_INLINING, \
123 LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING \
126 /* Tree dump hooks. */
127 int lhd_tree_dump_dump_tree PARAMS ((void *, tree));
128 int lhd_tree_dump_type_quals PARAMS ((tree));
130 #define LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN lhd_tree_dump_dump_tree
131 #define LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN lhd_tree_dump_type_quals
133 #define LANG_HOOKS_TREE_DUMP_INITIALIZER { \
134 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN, \
135 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN \
138 /* The whole thing. The structure is defined in langhooks.h. */
139 #define LANG_HOOKS_INITIALIZER { \
140 LANG_HOOKS_NAME, \
141 LANG_HOOKS_IDENTIFIER_SIZE, \
142 LANG_HOOKS_INIT_OPTIONS, \
143 LANG_HOOKS_DECODE_OPTION, \
144 LANG_HOOKS_POST_OPTIONS, \
145 LANG_HOOKS_INIT, \
146 LANG_HOOKS_FINISH, \
147 LANG_HOOKS_CLEAR_BINDING_STACK, \
148 LANG_HOOKS_GET_ALIAS_SET, \
149 LANG_HOOKS_EXPAND_CONSTANT, \
150 LANG_HOOKS_SAFE_FROM_P, \
151 LANG_HOOKS_STATICP, \
152 LANG_HOOKS_HONOR_READONLY, \
153 LANG_HOOKS_PRINT_STATISTICS, \
154 LANG_HOOKS_PRINT_XNODE, \
155 LANG_HOOKS_PRINT_DECL, \
156 LANG_HOOKS_PRINT_TYPE, \
157 LANG_HOOKS_PRINT_IDENTIFIER, \
158 LANG_HOOKS_SET_YYDEBUG, \
159 LANG_HOOKS_TREE_INLINING_INITIALIZER, \
160 LANG_HOOKS_TREE_DUMP_INITIALIZER \
163 #endif /* GCC_LANG_HOOKS_DEF_H */