]>
Commit | Line | Data |
---|---|---|
5dd72fac | 1 | /* Language hooks common to C++ and ObjC++ front ends. |
fbd26352 | 2 | Copyright (C) 2004-2019 Free Software Foundation, Inc. |
5dd72fac | 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 | |
aa139c3f | 9 | Software Foundation; either version 3, or (at your option) any later |
5dd72fac | 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 | |
aa139c3f | 18 | along with GCC; see the file COPYING3. If not see |
19 | <http://www.gnu.org/licenses/>. */ | |
5dd72fac | 20 | |
21 | #ifndef GCC_CP_OBJCP_COMMON | |
22 | #define GCC_CP_OBJCP_COMMON | |
23 | ||
2034deb9 | 24 | /* In cp/objcp-common.c, cp/cp-lang.c and objcp/objcp-lang.c. */ |
5dd72fac | 25 | |
2034deb9 | 26 | extern tree cp_get_debug_type (const_tree); |
183b9a74 | 27 | extern tree objcp_tsubst_copy_and_build (tree, tree, tsubst_flags_t, |
5dd72fac | 28 | tree, bool); |
29 | ||
35b516bd | 30 | extern int cp_decl_dwarf_attribute (const_tree, int); |
2034deb9 | 31 | extern int cp_type_dwarf_attribute (const_tree, int); |
9b88d08d | 32 | extern void cp_common_init_ts (void); |
3dae587b | 33 | extern tree cp_unit_size_without_reusable_padding (tree); |
3fd4f7d8 | 34 | extern tree cp_get_global_decls (); |
35 | extern tree cp_pushdecl (tree); | |
0fa326f5 | 36 | extern void cp_register_dumps (gcc::dump_manager *); |
5b63c39b | 37 | extern tree cxx_make_type_hook (tree_code); |
cb3582e7 | 38 | |
5dd72fac | 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 | ||
34e5cced | 43 | #undef LANG_HOOKS_FREE_LANG_DATA |
44 | #define LANG_HOOKS_FREE_LANG_DATA cp_free_lang_data | |
5dd72fac | 45 | #undef LANG_HOOKS_TREE_SIZE |
46 | #define LANG_HOOKS_TREE_SIZE cp_tree_size | |
47 | #undef LANG_HOOKS_FINISH | |
48 | #define LANG_HOOKS_FINISH cxx_finish | |
49 | #undef LANG_HOOKS_CLEAR_BINDING_STACK | |
50 | #define LANG_HOOKS_CLEAR_BINDING_STACK pop_everything | |
e88d34f6 | 51 | #undef LANG_HOOKS_OPTION_LANG_MASK |
52 | #define LANG_HOOKS_OPTION_LANG_MASK c_common_option_lang_mask | |
53 | #undef LANG_HOOKS_COMPLAIN_WRONG_LANG_P | |
54 | #define LANG_HOOKS_COMPLAIN_WRONG_LANG_P c_common_complain_wrong_lang_p | |
f3f006ad | 55 | #undef LANG_HOOKS_INIT_OPTIONS_STRUCT |
56 | #define LANG_HOOKS_INIT_OPTIONS_STRUCT c_common_init_options_struct | |
5dd72fac | 57 | #undef LANG_HOOKS_INIT_OPTIONS |
58 | #define LANG_HOOKS_INIT_OPTIONS c_common_init_options | |
59 | #undef LANG_HOOKS_INITIALIZE_DIAGNOSTICS | |
60 | #define LANG_HOOKS_INITIALIZE_DIAGNOSTICS cxx_initialize_diagnostics | |
0fa326f5 | 61 | #undef LANG_HOOKS_REGISTER_DUMPS |
62 | #define LANG_HOOKS_REGISTER_DUMPS cp_register_dumps | |
5dd72fac | 63 | #undef LANG_HOOKS_HANDLE_OPTION |
64 | #define LANG_HOOKS_HANDLE_OPTION c_common_handle_option | |
65 | #undef LANG_HOOKS_HANDLE_FILENAME | |
66 | #define LANG_HOOKS_HANDLE_FILENAME c_common_handle_filename | |
5dd72fac | 67 | #undef LANG_HOOKS_POST_OPTIONS |
68 | #define LANG_HOOKS_POST_OPTIONS c_common_post_options | |
69 | #undef LANG_HOOKS_GET_ALIAS_SET | |
70 | #define LANG_HOOKS_GET_ALIAS_SET cxx_get_alias_set | |
5dd72fac | 71 | #undef LANG_HOOKS_PARSE_FILE |
72 | #define LANG_HOOKS_PARSE_FILE c_common_parse_file | |
73 | #undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL | |
74 | #define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL cxx_dup_lang_specific_decl | |
5dd72fac | 75 | #undef LANG_HOOKS_SET_DECL_ASSEMBLER_NAME |
76 | #define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME mangle_decl | |
7c129b68 | 77 | #undef LANG_HOOKS_OVERWRITE_DECL_ASSEMBLER_NAME |
78 | #define LANG_HOOKS_OVERWRITE_DECL_ASSEMBLER_NAME overwrite_mangling | |
5dd72fac | 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 | |
601154bb | 83 | #undef LANG_HOOKS_DECL_PRINTABLE_NAME |
84 | #define LANG_HOOKS_DECL_PRINTABLE_NAME cxx_printable_name | |
5dd72fac | 85 | #undef LANG_HOOKS_PRINT_DECL |
86 | #define LANG_HOOKS_PRINT_DECL cxx_print_decl | |
87 | #undef LANG_HOOKS_PRINT_TYPE | |
88 | #define LANG_HOOKS_PRINT_TYPE cxx_print_type | |
89 | #undef LANG_HOOKS_PRINT_IDENTIFIER | |
90 | #define LANG_HOOKS_PRINT_IDENTIFIER cxx_print_identifier | |
3dac5c5e | 91 | #undef LANG_HOOKS_TYPES_COMPATIBLE_P |
92 | #define LANG_HOOKS_TYPES_COMPATIBLE_P cxx_types_compatible_p | |
5dd72fac | 93 | #undef LANG_HOOKS_PRINT_ERROR_FUNCTION |
94 | #define LANG_HOOKS_PRINT_ERROR_FUNCTION cxx_print_error_function | |
95 | #undef LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL | |
96 | #define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL cxx_warn_unused_global_decl | |
3a1c9df2 | 97 | #undef LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS |
98 | #define LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS cxx_post_compilation_parsing_cleanups | |
54be5d7e | 99 | #undef LANG_HOOKS_BUILTIN_FUNCTION |
100 | #define LANG_HOOKS_BUILTIN_FUNCTION cxx_builtin_function | |
24470055 | 101 | #undef LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE |
102 | #define LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE cxx_builtin_function_ext_scope | |
743f8dd1 | 103 | #undef LANG_HOOKS_TYPE_HASH_EQ |
104 | #define LANG_HOOKS_TYPE_HASH_EQ cxx_type_hash_eq | |
4edbdd46 | 105 | #undef LANG_HOOKS_COPY_LANG_QUALIFIERS |
106 | #define LANG_HOOKS_COPY_LANG_QUALIFIERS cxx_copy_lang_qualifiers | |
b75409ba | 107 | #undef LANG_HOOKS_MISSING_NORETURN_OK_P |
108 | #define LANG_HOOKS_MISSING_NORETURN_OK_P cp_missing_noreturn_ok_p | |
6cb25bec | 109 | #undef LANG_HOOKS_BLOCK_MAY_FALLTHRU |
110 | #define LANG_HOOKS_BLOCK_MAY_FALLTHRU cxx_block_may_fallthru | |
90567983 | 111 | #undef LANG_HOOKS_EMITS_BEGIN_STMT |
112 | #define LANG_HOOKS_EMITS_BEGIN_STMT true | |
5dd72fac | 113 | |
114 | /* Attribute hooks. */ | |
115 | #undef LANG_HOOKS_COMMON_ATTRIBUTE_TABLE | |
116 | #define LANG_HOOKS_COMMON_ATTRIBUTE_TABLE c_common_attribute_table | |
117 | #undef LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE | |
118 | #define LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE c_common_format_attribute_table | |
119 | #undef LANG_HOOKS_ATTRIBUTE_TABLE | |
120 | #define LANG_HOOKS_ATTRIBUTE_TABLE cxx_attribute_table | |
121 | ||
5dd72fac | 122 | #undef LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P |
123 | #define LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P cp_var_mod_type_p | |
124 | #undef LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN | |
125 | #define LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN cp_dump_tree | |
126 | #undef LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN | |
127 | #define LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN cp_type_quals | |
5dd72fac | 128 | |
5dd72fac | 129 | #undef LANG_HOOKS_MAKE_TYPE |
5b63c39b | 130 | #define LANG_HOOKS_MAKE_TYPE cxx_make_type_hook |
5dd72fac | 131 | #undef LANG_HOOKS_TYPE_FOR_MODE |
132 | #define LANG_HOOKS_TYPE_FOR_MODE c_common_type_for_mode | |
133 | #undef LANG_HOOKS_TYPE_FOR_SIZE | |
134 | #define LANG_HOOKS_TYPE_FOR_SIZE c_common_type_for_size | |
5dd72fac | 135 | #undef LANG_HOOKS_INCOMPLETE_TYPE_ERROR |
136 | #define LANG_HOOKS_INCOMPLETE_TYPE_ERROR cxx_incomplete_type_error | |
137 | #undef LANG_HOOKS_TYPE_PROMOTES_TO | |
138 | #define LANG_HOOKS_TYPE_PROMOTES_TO cxx_type_promotes_to | |
139 | #undef LANG_HOOKS_REGISTER_BUILTIN_TYPE | |
140 | #define LANG_HOOKS_REGISTER_BUILTIN_TYPE c_register_builtin_type | |
d991e6e8 | 141 | #undef LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE |
142 | #define LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE cp_reconstruct_complex_type | |
2034deb9 | 143 | #undef LANG_HOOKS_GET_DEBUG_TYPE |
144 | #define LANG_HOOKS_GET_DEBUG_TYPE cp_get_debug_type | |
624d37a6 | 145 | #undef LANG_HOOKS_TO_TARGET_CHARSET |
146 | #define LANG_HOOKS_TO_TARGET_CHARSET c_common_to_target_charset | |
5dd72fac | 147 | #undef LANG_HOOKS_GIMPLIFY_EXPR |
148 | #define LANG_HOOKS_GIMPLIFY_EXPR cp_gimplify_expr | |
35b516bd | 149 | #undef LANG_HOOKS_DECL_DWARF_ATTRIBUTE |
150 | #define LANG_HOOKS_DECL_DWARF_ATTRIBUTE cp_decl_dwarf_attribute | |
2034deb9 | 151 | #undef LANG_HOOKS_TYPE_DWARF_ATTRIBUTE |
152 | #define LANG_HOOKS_TYPE_DWARF_ATTRIBUTE cp_type_dwarf_attribute | |
3dae587b | 153 | #undef LANG_HOOKS_UNIT_SIZE_WITHOUT_REUSABLE_PADDING |
154 | #define LANG_HOOKS_UNIT_SIZE_WITHOUT_REUSABLE_PADDING cp_unit_size_without_reusable_padding | |
155 | ||
8487df40 | 156 | #undef LANG_HOOKS_OMP_PREDETERMINED_SHARING |
157 | #define LANG_HOOKS_OMP_PREDETERMINED_SHARING cxx_omp_predetermined_sharing | |
158 | #undef LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR | |
159 | #define LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR cxx_omp_clause_default_ctor | |
160 | #undef LANG_HOOKS_OMP_CLAUSE_COPY_CTOR | |
161 | #define LANG_HOOKS_OMP_CLAUSE_COPY_CTOR cxx_omp_clause_copy_ctor | |
162 | #undef LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP | |
163 | #define LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP cxx_omp_clause_assign_op | |
164 | #undef LANG_HOOKS_OMP_CLAUSE_DTOR | |
165 | #define LANG_HOOKS_OMP_CLAUSE_DTOR cxx_omp_clause_dtor | |
fd6481cf | 166 | #undef LANG_HOOKS_OMP_FINISH_CLAUSE |
167 | #define LANG_HOOKS_OMP_FINISH_CLAUSE cxx_omp_finish_clause | |
df2c34fc | 168 | #undef LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE |
169 | #define LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE cxx_omp_privatize_by_reference | |
bc7bff74 | 170 | #undef LANG_HOOKS_OMP_MAPPABLE_TYPE |
171 | #define LANG_HOOKS_OMP_MAPPABLE_TYPE cp_omp_mappable_type | |
43895be5 | 172 | #undef LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR |
173 | #define LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR cxx_omp_disregard_value_expr | |
5dd72fac | 174 | |
471eff36 | 175 | #undef LANG_HOOKS_EH_USE_CXA_END_CLEANUP |
176 | #define LANG_HOOKS_EH_USE_CXA_END_CLEANUP true | |
177 | ||
596981c8 | 178 | #undef LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS |
179 | #define LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS cp_protect_cleanup_actions | |
3fd4f7d8 | 180 | |
181 | #undef LANG_HOOKS_GETDECLS | |
182 | #define LANG_HOOKS_GETDECLS cp_get_global_decls | |
183 | #undef LANG_HOOKS_PUSHDECL | |
184 | #define LANG_HOOKS_PUSHDECL cp_pushdecl | |
5dd72fac | 185 | #endif /* GCC_CP_OBJCP_COMMON */ |