OSDN Git Service

a6ab3832a8fa8fb35b943f9fe425e373ef3a54f3
[pf3gnuchains/gcc-fork.git] / gcc / cp / cp-objcp-common.h
1 /* Language hooks common to C++ and ObjC++ front ends.
2    Copyright (C) 2004 Free Software Foundation, Inc.
3    Contributed by Ziemowit Laski  <zlaski@apple.com>
4
5 This file is part of GCC.
6
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
10 version.
11
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING.  If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA.  */
21
22 #ifndef GCC_CP_OBJCP_COMMON
23 #define GCC_CP_OBJCP_COMMON
24
25 /* In cp/cp-objcp-common.c.  */
26
27 extern HOST_WIDE_INT cxx_get_alias_set (tree);
28 extern bool cxx_warn_unused_global_decl (tree);
29 extern tree cp_expr_size (tree);
30 extern size_t cp_tree_size (enum tree_code);
31 extern bool cp_var_mod_type_p (tree, tree);
32 extern void cxx_initialize_diagnostics (struct diagnostic_context *);
33
34 /* In cp/cp-lang.c and objcp/objcp-lang.c.  */
35
36 extern tree objcp_tsubst_copy_and_build (tree, tree, tsubst_flags_t, 
37                                          tree, bool);
38
39 /* Lang hooks that are shared between C++ and ObjC++ are defined here.  Hooks
40    specific to C++ or ObjC++ go in cp/cp-lang.c and objcp/objcp-lang.c,
41    respectively.  */
42
43 #undef LANG_HOOKS_TREE_SIZE
44 #define LANG_HOOKS_TREE_SIZE cp_tree_size
45 #undef LANG_HOOKS_FINISH
46 #define LANG_HOOKS_FINISH cxx_finish
47 #undef LANG_HOOKS_CLEAR_BINDING_STACK
48 #define LANG_HOOKS_CLEAR_BINDING_STACK pop_everything
49 #undef LANG_HOOKS_INIT_OPTIONS
50 #define LANG_HOOKS_INIT_OPTIONS c_common_init_options
51 #undef LANG_HOOKS_INITIALIZE_DIAGNOSTICS
52 #define LANG_HOOKS_INITIALIZE_DIAGNOSTICS cxx_initialize_diagnostics
53 #undef LANG_HOOKS_HANDLE_OPTION
54 #define LANG_HOOKS_HANDLE_OPTION c_common_handle_option
55 #undef LANG_HOOKS_HANDLE_FILENAME
56 #define LANG_HOOKS_HANDLE_FILENAME c_common_handle_filename
57 #undef LANG_HOOKS_MISSING_ARGUMENT
58 #define LANG_HOOKS_MISSING_ARGUMENT c_common_missing_argument
59 #undef LANG_HOOKS_POST_OPTIONS
60 #define LANG_HOOKS_POST_OPTIONS c_common_post_options
61 #undef LANG_HOOKS_GET_ALIAS_SET
62 #define LANG_HOOKS_GET_ALIAS_SET cxx_get_alias_set
63 #undef LANG_HOOKS_EXPAND_CONSTANT
64 #define LANG_HOOKS_EXPAND_CONSTANT cplus_expand_constant
65 #undef LANG_HOOKS_EXPAND_EXPR
66 #define LANG_HOOKS_EXPAND_EXPR cxx_expand_expr
67 #undef LANG_HOOKS_EXPAND_DECL
68 #define LANG_HOOKS_EXPAND_DECL c_expand_decl
69 #undef LANG_HOOKS_PARSE_FILE
70 #define LANG_HOOKS_PARSE_FILE c_common_parse_file
71 #undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
72 #define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL cxx_dup_lang_specific_decl
73 #undef LANG_HOOKS_TRUTHVALUE_CONVERSION
74 #define LANG_HOOKS_TRUTHVALUE_CONVERSION c_common_truthvalue_conversion
75 #undef LANG_HOOKS_SET_DECL_ASSEMBLER_NAME
76 #define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME mangle_decl
77 #undef LANG_HOOKS_MARK_ADDRESSABLE
78 #define LANG_HOOKS_MARK_ADDRESSABLE cxx_mark_addressable
79 #undef LANG_HOOKS_PRINT_STATISTICS
80 #define LANG_HOOKS_PRINT_STATISTICS cxx_print_statistics
81 #undef LANG_HOOKS_PRINT_XNODE
82 #define LANG_HOOKS_PRINT_XNODE cxx_print_xnode
83 #undef LANG_HOOKS_PRINT_DECL
84 #define LANG_HOOKS_PRINT_DECL cxx_print_decl
85 #undef LANG_HOOKS_PRINT_TYPE
86 #define LANG_HOOKS_PRINT_TYPE cxx_print_type
87 #undef LANG_HOOKS_PRINT_IDENTIFIER
88 #define LANG_HOOKS_PRINT_IDENTIFIER cxx_print_identifier
89 #undef LANG_HOOKS_PRINT_ERROR_FUNCTION
90 #define LANG_HOOKS_PRINT_ERROR_FUNCTION cxx_print_error_function
91 #undef LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL
92 #define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL cxx_warn_unused_global_decl
93 #undef LANG_HOOKS_WRITE_GLOBALS
94 #define LANG_HOOKS_WRITE_GLOBALS lhd_do_nothing
95 #undef LANG_HOOKS_COMDAT_GROUP
96 #define LANG_HOOKS_COMDAT_GROUP cxx_comdat_group
97
98 #undef LANG_HOOKS_FUNCTION_INIT
99 #define LANG_HOOKS_FUNCTION_INIT cxx_push_function_context
100 #undef LANG_HOOKS_FUNCTION_FINAL
101 #define LANG_HOOKS_FUNCTION_FINAL cxx_pop_function_context
102 #undef LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P
103 #define LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P cp_missing_noreturn_ok_p
104
105 /* Attribute hooks.  */
106 #undef LANG_HOOKS_COMMON_ATTRIBUTE_TABLE
107 #define LANG_HOOKS_COMMON_ATTRIBUTE_TABLE c_common_attribute_table
108 #undef LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE
109 #define LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE c_common_format_attribute_table
110 #undef LANG_HOOKS_ATTRIBUTE_TABLE
111 #define LANG_HOOKS_ATTRIBUTE_TABLE cxx_attribute_table
112
113 #undef LANG_HOOKS_TREE_INLINING_WALK_SUBTREES
114 #define LANG_HOOKS_TREE_INLINING_WALK_SUBTREES \
115   cp_walk_subtrees
116 #undef LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN
117 #define LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN \
118   cp_cannot_inline_tree_fn
119 #undef LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS
120 #define LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS \
121   cp_add_pending_fn_decls
122 #undef LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P
123 #define LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P \
124   cp_auto_var_in_fn_p
125 #undef LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P
126 #define LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P anon_aggr_type_p
127 #undef LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P
128 #define LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P cp_var_mod_type_p
129 #undef LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN
130 #define LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN cp_dump_tree
131 #undef LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN
132 #define LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN cp_type_quals
133 #undef LANG_HOOKS_EXPR_SIZE
134 #define LANG_HOOKS_EXPR_SIZE cp_expr_size
135
136 #undef LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR
137 #define LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR cxx_callgraph_analyze_expr
138 #undef LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION
139 #define LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION expand_body
140
141 #undef LANG_HOOKS_MAKE_TYPE
142 #define LANG_HOOKS_MAKE_TYPE cxx_make_type
143 #undef LANG_HOOKS_TYPE_FOR_MODE
144 #define LANG_HOOKS_TYPE_FOR_MODE c_common_type_for_mode
145 #undef LANG_HOOKS_TYPE_FOR_SIZE
146 #define LANG_HOOKS_TYPE_FOR_SIZE c_common_type_for_size
147 #undef LANG_HOOKS_SIGNED_TYPE
148 #define LANG_HOOKS_SIGNED_TYPE c_common_signed_type
149 #undef LANG_HOOKS_UNSIGNED_TYPE
150 #define LANG_HOOKS_UNSIGNED_TYPE c_common_unsigned_type
151 #undef LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE
152 #define LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE c_common_signed_or_unsigned_type
153 #undef LANG_HOOKS_INCOMPLETE_TYPE_ERROR
154 #define LANG_HOOKS_INCOMPLETE_TYPE_ERROR cxx_incomplete_type_error
155 #undef LANG_HOOKS_TYPE_PROMOTES_TO
156 #define LANG_HOOKS_TYPE_PROMOTES_TO cxx_type_promotes_to
157 #undef LANG_HOOKS_REGISTER_BUILTIN_TYPE
158 #define LANG_HOOKS_REGISTER_BUILTIN_TYPE c_register_builtin_type
159 #undef LANG_HOOKS_GIMPLIFY_EXPR
160 #define LANG_HOOKS_GIMPLIFY_EXPR cp_gimplify_expr
161 #undef LANG_HOOKS_FOLD_OBJ_TYPE_REF
162 #define LANG_HOOKS_FOLD_OBJ_TYPE_REF cp_fold_obj_type_ref
163
164 #endif /* GCC_CP_OBJCP_COMMON */