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)
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_H
23 #define GCC_LANG_HOOKS_H
25 /* Note to creators of new hooks:
27 The macros in this file should NOT be surrounded by a
28 #ifdef...#endif pair, since this file declares the defaults. Each
29 front end overrides any hooks it wishes to, in the file containing
30 its struct lang_hooks, AFTER including this file. */
32 /* See toplev.h for the definition and documentation of each hook. */
34 extern void lang_hook_default_do_nothing PARAMS ((void));
35 extern int lang_hook_default_decode_option PARAMS ((int, char **));
37 #define LANG_HOOKS_INIT lang_hook_default_do_nothing
38 #define LANG_HOOKS_FINISH lang_hook_default_do_nothing
39 #define LANG_HOOKS_INIT_OPTIONS lang_hook_default_do_nothing
40 #define LANG_HOOKS_DECODE_OPTION lang_hook_default_decode_option
41 #define LANG_HOOKS_POST_OPTIONS lang_hook_default_do_nothing
43 #define LANG_HOOKS_HONOR_READONLY false
45 /* Declarations of default tree inlining hooks. */
46 tree tree_inlining_default_hook_walk_subtrees PARAMS ((tree*, int *,
49 int tree_inlining_default_hook_cannot_inline_tree_fn PARAMS ((tree*));
50 int tree_inlining_default_hook_disregard_inline_limits PARAMS ((tree));
51 tree tree_inlining_default_hook_add_pending_fn_decls PARAMS ((void*, tree));
52 int tree_inlining_default_hook_tree_chain_matters_p PARAMS ((tree));
53 int tree_inlining_default_hook_auto_var_in_fn_p PARAMS ((tree, tree));
54 tree tree_inlining_default_hook_copy_res_decl_for_inlining PARAMS ((tree, tree,
59 int tree_inlining_default_hook_anon_aggr_type_p PARAMS ((tree));
61 /* Tree inlining hooks. */
62 #define LANG_HOOKS_TREE_INLINING_WALK_SUBTREES \
63 tree_inlining_default_hook_walk_subtrees
64 #define LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN \
65 tree_inlining_default_hook_cannot_inline_tree_fn
66 #define LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS \
67 tree_inlining_default_hook_disregard_inline_limits
68 #define LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS \
69 tree_inlining_default_hook_add_pending_fn_decls
70 #define LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P \
71 tree_inlining_default_hook_tree_chain_matters_p
72 #define LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P \
73 tree_inlining_default_hook_auto_var_in_fn_p
74 #define LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING \
75 tree_inlining_default_hook_copy_res_decl_for_inlining
76 #define LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P \
77 tree_inlining_default_hook_anon_aggr_type_p
79 #define LANG_HOOKS_TREE_INLINING_INITIALIZER { \
80 LANG_HOOKS_TREE_INLINING_WALK_SUBTREES, \
81 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN, \
82 LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS, \
83 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS, \
84 LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P, \
85 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P, \
86 LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING, \
87 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P \
90 /* The whole thing. The structure is defined in toplev.h. */
91 #define LANG_HOOKS_INITIALIZER { \
94 LANG_HOOKS_INIT_OPTIONS, \
95 LANG_HOOKS_DECODE_OPTION, \
96 LANG_HOOKS_POST_OPTIONS, \
97 LANG_HOOKS_HONOR_READONLY, \
98 LANG_HOOKS_TREE_INLINING_INITIALIZER \
101 #endif /* GCC_LANG_HOOKS_H */