]>
Commit | Line | Data |
---|---|---|
77b1a921 | 1 | /* Default macros to initialize the lang_hooks data structure. |
69dcadff AO |
2 | Copyright 2001 Free Software Foundation, Inc. |
3 | Contributed by Alexandre Oliva <aoliva@redhat.com> | |
4 | ||
5 | This file is part of GNU CC. | |
6 | ||
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. | |
11 | ||
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. | |
16 | ||
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. */ | |
21 | ||
22 | #ifndef GCC_LANG_HOOKS_H | |
23 | #define GCC_LANG_HOOKS_H | |
24 | ||
8ac61af7 RK |
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)); | |
28 | ||
77b1a921 NB |
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 | /* See toplev.h for the definition and documentation of each hook. */ | |
37 | ||
38 | extern void lang_hook_default_do_nothing PARAMS ((void)); | |
39 | extern int lang_hook_default_decode_option PARAMS ((int, char **)); | |
8ac61af7 | 40 | extern HOST_WIDE_INT lang_hook_default_get_alias_set PARAMS ((tree)); |
37207ee7 | 41 | extern void lang_hook_default_clear_binding_stack PARAMS ((void)); |
77b1a921 NB |
42 | |
43 | #define LANG_HOOKS_INIT lang_hook_default_do_nothing | |
44 | #define LANG_HOOKS_FINISH lang_hook_default_do_nothing | |
37207ee7 | 45 | #define LANG_HOOKS_CLEAR_BINDING_STACK lang_hook_default_clear_binding_stack |
77b1a921 NB |
46 | #define LANG_HOOKS_INIT_OPTIONS lang_hook_default_do_nothing |
47 | #define LANG_HOOKS_DECODE_OPTION lang_hook_default_decode_option | |
48 | #define LANG_HOOKS_POST_OPTIONS lang_hook_default_do_nothing | |
8ac61af7 | 49 | #define LANG_HOOKS_GET_ALIAS_SET lang_hook_default_get_alias_set |
77b1a921 NB |
50 | |
51 | #define LANG_HOOKS_HONOR_READONLY false | |
69dcadff AO |
52 | |
53 | /* Declarations of default tree inlining hooks. */ | |
8ac61af7 RK |
54 | tree tree_inlining_default_hook_walk_subtrees PARAMS ((tree *, int *, |
55 | walk_tree_fn, | |
56 | void *, | |
57 | void *)); | |
58 | int tree_inlining_default_hook_cannot_inline_tree_fn PARAMS ((tree *)); | |
59 | int tree_inlining_default_hook_disregard_inline_limits PARAMS ((tree)); | |
60 | tree tree_inlining_default_hook_add_pending_fn_decls PARAMS ((void *, | |
61 | tree)); | |
62 | int tree_inlining_default_hook_tree_chain_matters_p PARAMS ((tree)); | |
63 | int tree_inlining_default_hook_auto_var_in_fn_p PARAMS ((tree, tree)); | |
69dcadff AO |
64 | tree tree_inlining_default_hook_copy_res_decl_for_inlining PARAMS ((tree, tree, |
65 | tree, | |
66 | void *, | |
67 | int *, | |
68 | void *)); | |
8ac61af7 | 69 | int tree_inlining_default_hook_anon_aggr_type_p PARAMS ((tree)); |
69dcadff AO |
70 | |
71 | /* Tree inlining hooks. */ | |
69dcadff AO |
72 | #define LANG_HOOKS_TREE_INLINING_WALK_SUBTREES \ |
73 | tree_inlining_default_hook_walk_subtrees | |
69dcadff AO |
74 | #define LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN \ |
75 | tree_inlining_default_hook_cannot_inline_tree_fn | |
69dcadff AO |
76 | #define LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS \ |
77 | tree_inlining_default_hook_disregard_inline_limits | |
69dcadff AO |
78 | #define LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS \ |
79 | tree_inlining_default_hook_add_pending_fn_decls | |
69dcadff AO |
80 | #define LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P \ |
81 | tree_inlining_default_hook_tree_chain_matters_p | |
69dcadff AO |
82 | #define LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P \ |
83 | tree_inlining_default_hook_auto_var_in_fn_p | |
69dcadff AO |
84 | #define LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING \ |
85 | tree_inlining_default_hook_copy_res_decl_for_inlining | |
69dcadff AO |
86 | #define LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P \ |
87 | tree_inlining_default_hook_anon_aggr_type_p | |
69dcadff AO |
88 | |
89 | #define LANG_HOOKS_TREE_INLINING_INITIALIZER { \ | |
90 | LANG_HOOKS_TREE_INLINING_WALK_SUBTREES, \ | |
91 | LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN, \ | |
92 | LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS, \ | |
93 | LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS, \ | |
94 | LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P, \ | |
95 | LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P, \ | |
96 | LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING, \ | |
97 | LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P \ | |
98 | } \ | |
99 | ||
100 | /* The whole thing. The structure is defined in toplev.h. */ | |
101 | #define LANG_HOOKS_INITIALIZER { \ | |
102 | LANG_HOOKS_INIT, \ | |
103 | LANG_HOOKS_FINISH, \ | |
37207ee7 | 104 | LANG_HOOKS_CLEAR_BINDING_STACK, \ |
69dcadff AO |
105 | LANG_HOOKS_INIT_OPTIONS, \ |
106 | LANG_HOOKS_DECODE_OPTION, \ | |
107 | LANG_HOOKS_POST_OPTIONS, \ | |
8ac61af7 | 108 | LANG_HOOKS_GET_ALIAS_SET, \ |
03bf2c23 | 109 | LANG_HOOKS_HONOR_READONLY, \ |
69dcadff AO |
110 | LANG_HOOKS_TREE_INLINING_INITIALIZER \ |
111 | } | |
112 | ||
113 | #endif /* GCC_LANG_HOOKS_H */ |