Remove some compile time warnings about duplicate definitions.
[official-gcc.git] / gcc / langhooks-def.h
blob7c8480f4f842a07613a3e5942b1480858200c599
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 /* 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. */
27 extern HOST_WIDE_INT hook_get_alias_set_0 PARAMS ((tree));
29 /* Note to creators of new hooks:
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.
36 Prefix all default hooks with "lhd_". */
38 /* See langhooks.h for the definition and documentation of each hook. */
40 extern void lhd_do_nothing PARAMS ((void));
41 extern int lhd_decode_option PARAMS ((int, char **));
42 extern HOST_WIDE_INT lhd_get_alias_set PARAMS ((tree));
43 extern void lhd_clear_binding_stack PARAMS ((void));
44 extern void lhd_print_tree_nothing PARAMS ((FILE *, tree, int));
45 extern void lhd_set_yydebug PARAMS ((int));
47 /* Declarations of default tree inlining hooks. */
48 tree lhd_tree_inlining_walk_subtrees PARAMS ((tree *, int *,
49 walk_tree_fn,
50 void *, void *));
51 int lhd_tree_inlining_cannot_inline_tree_fn PARAMS ((tree *));
52 int lhd_tree_inlining_disregard_inline_limits PARAMS ((tree));
53 tree lhd_tree_inlining_add_pending_fn_decls PARAMS ((void *, tree));
54 int lhd_tree_inlining_tree_chain_matters_p PARAMS ((tree));
55 int lhd_tree_inlining_auto_var_in_fn_p PARAMS ((tree, tree));
56 tree lhd_tree_inlining_copy_res_decl_for_inlining PARAMS ((tree, tree,
57 tree, void *,
58 int *, void *));
59 int lhd_tree_inlining_anon_aggr_type_p PARAMS ((tree));
61 #define LANG_HOOKS_NAME "GNU unknown"
62 #define LANG_HOOKS_IDENTIFIER_SIZE sizeof (struct lang_identifier)
63 #define LANG_HOOKS_INIT lhd_do_nothing
64 #define LANG_HOOKS_FINISH lhd_do_nothing
65 #define LANG_HOOKS_CLEAR_BINDING_STACK lhd_clear_binding_stack
66 #define LANG_HOOKS_INIT_OPTIONS lhd_do_nothing
67 #define LANG_HOOKS_DECODE_OPTION lhd_decode_option
68 #define LANG_HOOKS_POST_OPTIONS lhd_do_nothing
69 #define LANG_HOOKS_GET_ALIAS_SET lhd_get_alias_set
70 #define LANG_HOOKS_HONOR_READONLY false
71 #define LANG_HOOKS_PRINT_STATISTICS lhd_do_nothing
72 #define LANG_HOOKS_PRINT_XNODE lhd_print_tree_nothing
73 #define LANG_HOOKS_PRINT_DECL lhd_print_tree_nothing
74 #define LANG_HOOKS_PRINT_TYPE lhd_print_tree_nothing
75 #define LANG_HOOKS_PRINT_IDENTIFIER lhd_print_tree_nothing
76 #define LANG_HOOKS_SET_YYDEBUG lhd_set_yydebug
78 /* Tree inlining hooks. */
79 #define LANG_HOOKS_TREE_INLINING_WALK_SUBTREES lhd_tree_inlining_walk_subtrees
80 #define LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN \
81 lhd_tree_inlining_cannot_inline_tree_fn
82 #define LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS \
83 lhd_tree_inlining_disregard_inline_limits
84 #define LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS \
85 lhd_tree_inlining_add_pending_fn_decls
86 #define LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P \
87 lhd_tree_inlining_tree_chain_matters_p
88 #define LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P \
89 lhd_tree_inlining_auto_var_in_fn_p
90 #define LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING \
91 lhd_tree_inlining_copy_res_decl_for_inlining
92 #define LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P \
93 lhd_tree_inlining_anon_aggr_type_p
95 #define LANG_HOOKS_TREE_INLINING_INITIALIZER { \
96 LANG_HOOKS_TREE_INLINING_WALK_SUBTREES, \
97 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN, \
98 LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS, \
99 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS, \
100 LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P, \
101 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P, \
102 LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING, \
103 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P \
106 /* Tree dump hooks. */
107 int lhd_tree_dump_dump_tree PARAMS ((void *, tree));
108 int lhd_tree_dump_type_quals PARAMS ((tree));
110 #define LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN lhd_tree_dump_dump_tree
111 #define LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN lhd_tree_dump_type_quals
113 #define LANG_HOOKS_TREE_DUMP_INITIALIZER { \
114 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN, \
115 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN \
118 /* The whole thing. The structure is defined in langhooks.h. */
119 #define LANG_HOOKS_INITIALIZER { \
120 LANG_HOOKS_NAME, \
121 LANG_HOOKS_IDENTIFIER_SIZE, \
122 LANG_HOOKS_INIT, \
123 LANG_HOOKS_FINISH, \
124 LANG_HOOKS_CLEAR_BINDING_STACK, \
125 LANG_HOOKS_INIT_OPTIONS, \
126 LANG_HOOKS_DECODE_OPTION, \
127 LANG_HOOKS_POST_OPTIONS, \
128 LANG_HOOKS_GET_ALIAS_SET, \
129 LANG_HOOKS_HONOR_READONLY, \
130 LANG_HOOKS_PRINT_STATISTICS, \
131 LANG_HOOKS_PRINT_XNODE, \
132 LANG_HOOKS_PRINT_DECL, \
133 LANG_HOOKS_PRINT_TYPE, \
134 LANG_HOOKS_PRINT_IDENTIFIER, \
135 LANG_HOOKS_SET_YYDEBUG, \
136 LANG_HOOKS_TREE_INLINING_INITIALIZER, \
137 LANG_HOOKS_TREE_DUMP_INITIALIZER \
140 #endif /* GCC_LANG_HOOKS_DEF_H */