OSDN Git Service

* langhooks.h (LANG_HOOKS_HONOR_READONLY): New macro.
[pf3gnuchains/gcc-fork.git] / gcc / langhooks.h
1 /* Macros to initialize the lang_hooks data structure.
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
25 /* Older hooks, that don't go in sub-structures for backward
26    compatibility.  */
27 #ifndef LANG_HOOKS_INIT
28 #define LANG_HOOKS_INIT NULL
29 #endif
30 #ifndef LANG_HOOKS_FINISH
31 #define LANG_HOOKS_FINISH NULL
32 #endif
33 #ifndef LANG_HOOKS_INIT_OPTIONS
34 #define LANG_HOOKS_INIT_OPTIONS NULL
35 #endif
36 #ifndef LANG_HOOKS_DECODE_OPTION
37 #define LANG_HOOKS_DECODE_OPTION NULL
38 #endif
39 #ifndef LANG_HOOKS_POST_OPTIONS
40 #define LANG_HOOKS_POST_OPTIONS NULL
41 #endif
42 #ifndef LANG_HOOKS_HONOR_READONLY
43 #define LANG_HOOKS_HONOR_READONLY 0
44 #endif
45
46 /* Declarations of default tree inlining hooks.  */
47 tree tree_inlining_default_hook_walk_subtrees PARAMS ((tree*, int *,
48                                                        walk_tree_fn,
49                                                        void *, void *));
50 int tree_inlining_default_hook_cannot_inline_tree_fn PARAMS ((tree*));
51 int tree_inlining_default_hook_disregard_inline_limits PARAMS ((tree));
52 tree tree_inlining_default_hook_add_pending_fn_decls PARAMS ((void*, tree));
53 int tree_inlining_default_hook_tree_chain_matters_p PARAMS ((tree));
54 int tree_inlining_default_hook_auto_var_in_fn_p PARAMS ((tree, tree));
55 tree tree_inlining_default_hook_copy_res_decl_for_inlining PARAMS ((tree, tree,
56                                                                     tree,
57                                                                     void *,
58                                                                     int *,
59                                                                     void *));
60 int tree_inlining_default_hook_anon_aggr_type_p PARAMS ((tree));
61
62 /* Tree inlining hooks.  */
63 #ifndef LANG_HOOKS_TREE_INLINING_WALK_SUBTREES
64 #define LANG_HOOKS_TREE_INLINING_WALK_SUBTREES \
65   tree_inlining_default_hook_walk_subtrees
66 #endif
67 #ifndef LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN
68 #define LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN \
69   tree_inlining_default_hook_cannot_inline_tree_fn
70 #endif
71 #ifndef LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS
72 #define LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS \
73   tree_inlining_default_hook_disregard_inline_limits
74 #endif
75 #ifndef LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS
76 #define LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS \
77   tree_inlining_default_hook_add_pending_fn_decls
78 #endif
79 #ifndef LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P
80 #define LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P \
81   tree_inlining_default_hook_tree_chain_matters_p
82 #endif
83 #ifndef LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P
84 #define LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P \
85   tree_inlining_default_hook_auto_var_in_fn_p
86 #endif
87 #ifndef LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING
88 #define LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING \
89   tree_inlining_default_hook_copy_res_decl_for_inlining
90 #endif
91 #ifndef LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P
92 #define LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P \
93   tree_inlining_default_hook_anon_aggr_type_p
94 #endif
95
96 #define LANG_HOOKS_TREE_INLINING_INITIALIZER { \
97   LANG_HOOKS_TREE_INLINING_WALK_SUBTREES, \
98   LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN, \
99   LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS, \
100   LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS, \
101   LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P, \
102   LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P, \
103   LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING, \
104   LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P \
105 } \
106
107 /* The whole thing.  The structure is defined in toplev.h.  */
108 #define LANG_HOOKS_INITIALIZER { \
109   LANG_HOOKS_INIT, \
110   LANG_HOOKS_FINISH, \
111   LANG_HOOKS_INIT_OPTIONS, \
112   LANG_HOOKS_DECODE_OPTION, \
113   LANG_HOOKS_POST_OPTIONS, \
114   LANG_HOOKS_HONOR_READONLY, \
115   LANG_HOOKS_TREE_INLINING_INITIALIZER \
116 }
117
118 #endif /* GCC_LANG_HOOKS_H */