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