]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/cp/cp-objcp-common.h
Update copyright years.
[thirdparty/gcc.git] / gcc / cp / cp-objcp-common.h
CommitLineData
11bb4b27 1/* Language hooks common to C++ and ObjC++ front ends.
7adcbafe 2 Copyright (C) 2004-2022 Free Software Foundation, Inc.
11bb4b27
ZL
3 Contributed by Ziemowit Laski <zlaski@apple.com>
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free
e77f031d 9Software Foundation; either version 3, or (at your option) any later
11bb4b27
ZL
10version.
11
12GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13WARRANTY; without even the implied warranty of MERCHANTABILITY or
14FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15for more details.
16
17You should have received a copy of the GNU General Public License
e77f031d
NC
18along with GCC; see the file COPYING3. If not see
19<http://www.gnu.org/licenses/>. */
11bb4b27
ZL
20
21#ifndef GCC_CP_OBJCP_COMMON
22#define GCC_CP_OBJCP_COMMON
23
6905c577 24/* In cp/objcp-common.c, cp/cp-lang.c and objcp/objcp-lang.c. */
11bb4b27 25
6905c577 26extern tree cp_get_debug_type (const_tree);
c3002ae9 27extern tree objcp_tsubst_copy_and_build (tree, tree, tsubst_flags_t,
11bb4b27
ZL
28 tree, bool);
29
81b42cc6 30extern int cp_decl_dwarf_attribute (const_tree, int);
6905c577 31extern int cp_type_dwarf_attribute (const_tree, int);
81f653d6 32extern void cp_common_init_ts (void);
b7fc43d7 33extern tree cp_unit_size_without_reusable_padding (tree);
505dd180
NS
34extern tree cp_get_global_decls ();
35extern tree cp_pushdecl (tree);
2a8a8d7b 36extern void cp_register_dumps (gcc::dump_manager *);
97b56dec
NS
37extern bool cp_handle_option (size_t, const char *, HOST_WIDE_INT, int,
38 location_t, const struct cl_option_handlers *);
6ec04704 39extern tree cxx_make_type_hook (tree_code);
ac2cfa6c 40extern tree cxx_simulate_enum_decl (location_t, const char *,
6b0bde7e 41 vec<string_int_pair> *);
d5c6604f
RS
42extern tree cxx_simulate_record_decl (location_t, const char *,
43 array_slice<const tree>);
68599f33 44
11bb4b27
ZL
45/* Lang hooks that are shared between C++ and ObjC++ are defined here. Hooks
46 specific to C++ or ObjC++ go in cp/cp-lang.c and objcp/objcp-lang.c,
47 respectively. */
48
4537ec0c
DN
49#undef LANG_HOOKS_FREE_LANG_DATA
50#define LANG_HOOKS_FREE_LANG_DATA cp_free_lang_data
11bb4b27
ZL
51#undef LANG_HOOKS_TREE_SIZE
52#define LANG_HOOKS_TREE_SIZE cp_tree_size
53#undef LANG_HOOKS_FINISH
54#define LANG_HOOKS_FINISH cxx_finish
55#undef LANG_HOOKS_CLEAR_BINDING_STACK
56#define LANG_HOOKS_CLEAR_BINDING_STACK pop_everything
7a9bf9a4
JM
57#undef LANG_HOOKS_OPTION_LANG_MASK
58#define LANG_HOOKS_OPTION_LANG_MASK c_common_option_lang_mask
59#undef LANG_HOOKS_COMPLAIN_WRONG_LANG_P
60#define LANG_HOOKS_COMPLAIN_WRONG_LANG_P c_common_complain_wrong_lang_p
a75bfaa6
JM
61#undef LANG_HOOKS_INIT_OPTIONS_STRUCT
62#define LANG_HOOKS_INIT_OPTIONS_STRUCT c_common_init_options_struct
11bb4b27
ZL
63#undef LANG_HOOKS_INIT_OPTIONS
64#define LANG_HOOKS_INIT_OPTIONS c_common_init_options
65#undef LANG_HOOKS_INITIALIZE_DIAGNOSTICS
66#define LANG_HOOKS_INITIALIZE_DIAGNOSTICS cxx_initialize_diagnostics
2a8a8d7b
NS
67#undef LANG_HOOKS_REGISTER_DUMPS
68#define LANG_HOOKS_REGISTER_DUMPS cp_register_dumps
11bb4b27 69#undef LANG_HOOKS_HANDLE_OPTION
97b56dec 70#define LANG_HOOKS_HANDLE_OPTION cp_handle_option
11bb4b27
ZL
71#undef LANG_HOOKS_HANDLE_FILENAME
72#define LANG_HOOKS_HANDLE_FILENAME c_common_handle_filename
11bb4b27
ZL
73#undef LANG_HOOKS_POST_OPTIONS
74#define LANG_HOOKS_POST_OPTIONS c_common_post_options
75#undef LANG_HOOKS_GET_ALIAS_SET
76#define LANG_HOOKS_GET_ALIAS_SET cxx_get_alias_set
11bb4b27
ZL
77#undef LANG_HOOKS_PARSE_FILE
78#define LANG_HOOKS_PARSE_FILE c_common_parse_file
79#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
80#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL cxx_dup_lang_specific_decl
11bb4b27
ZL
81#undef LANG_HOOKS_SET_DECL_ASSEMBLER_NAME
82#define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME mangle_decl
5f3682ff
NS
83#undef LANG_HOOKS_OVERWRITE_DECL_ASSEMBLER_NAME
84#define LANG_HOOKS_OVERWRITE_DECL_ASSEMBLER_NAME overwrite_mangling
11bb4b27
ZL
85#undef LANG_HOOKS_PRINT_STATISTICS
86#define LANG_HOOKS_PRINT_STATISTICS cxx_print_statistics
87#undef LANG_HOOKS_PRINT_XNODE
88#define LANG_HOOKS_PRINT_XNODE cxx_print_xnode
be8cf3b5
NP
89#undef LANG_HOOKS_DECL_PRINTABLE_NAME
90#define LANG_HOOKS_DECL_PRINTABLE_NAME cxx_printable_name
11bb4b27
ZL
91#undef LANG_HOOKS_PRINT_DECL
92#define LANG_HOOKS_PRINT_DECL cxx_print_decl
93#undef LANG_HOOKS_PRINT_TYPE
94#define LANG_HOOKS_PRINT_TYPE cxx_print_type
95#undef LANG_HOOKS_PRINT_IDENTIFIER
96#define LANG_HOOKS_PRINT_IDENTIFIER cxx_print_identifier
65958285
ZL
97#undef LANG_HOOKS_TYPES_COMPATIBLE_P
98#define LANG_HOOKS_TYPES_COMPATIBLE_P cxx_types_compatible_p
11bb4b27
ZL
99#undef LANG_HOOKS_PRINT_ERROR_FUNCTION
100#define LANG_HOOKS_PRINT_ERROR_FUNCTION cxx_print_error_function
101#undef LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL
102#define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL cxx_warn_unused_global_decl
d7438551
AH
103#undef LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS
104#define LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS cxx_post_compilation_parsing_cleanups
c79efc4d
RÁE
105#undef LANG_HOOKS_BUILTIN_FUNCTION
106#define LANG_HOOKS_BUILTIN_FUNCTION cxx_builtin_function
5779e713
MM
107#undef LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE
108#define LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE cxx_builtin_function_ext_scope
74078538
RS
109#undef LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL
110#define LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL \
111 cxx_simulate_builtin_function_decl
2dff8956
JJ
112#undef LANG_HOOKS_TYPE_HASH_EQ
113#define LANG_HOOKS_TYPE_HASH_EQ cxx_type_hash_eq
27c825c5
JM
114#undef LANG_HOOKS_COPY_LANG_QUALIFIERS
115#define LANG_HOOKS_COPY_LANG_QUALIFIERS cxx_copy_lang_qualifiers
e8924938
PB
116#undef LANG_HOOKS_MISSING_NORETURN_OK_P
117#define LANG_HOOKS_MISSING_NORETURN_OK_P cp_missing_noreturn_ok_p
88cd0e88
JJ
118#undef LANG_HOOKS_BLOCK_MAY_FALLTHRU
119#define LANG_HOOKS_BLOCK_MAY_FALLTHRU cxx_block_may_fallthru
96a95ac1
AO
120#undef LANG_HOOKS_EMITS_BEGIN_STMT
121#define LANG_HOOKS_EMITS_BEGIN_STMT true
c6ef9d8d
RB
122#undef LANG_HOOKS_FINALIZE_EARLY_DEBUG
123#define LANG_HOOKS_FINALIZE_EARLY_DEBUG c_common_finalize_early_debug
11bb4b27
ZL
124
125/* Attribute hooks. */
126#undef LANG_HOOKS_COMMON_ATTRIBUTE_TABLE
127#define LANG_HOOKS_COMMON_ATTRIBUTE_TABLE c_common_attribute_table
128#undef LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE
129#define LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE c_common_format_attribute_table
130#undef LANG_HOOKS_ATTRIBUTE_TABLE
131#define LANG_HOOKS_ATTRIBUTE_TABLE cxx_attribute_table
132
11bb4b27
ZL
133#undef LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P
134#define LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P cp_var_mod_type_p
135#undef LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN
136#define LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN cp_dump_tree
137#undef LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN
138#define LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN cp_type_quals
11bb4b27 139
11bb4b27 140#undef LANG_HOOKS_MAKE_TYPE
6ec04704 141#define LANG_HOOKS_MAKE_TYPE cxx_make_type_hook
ac2cfa6c
RS
142#undef LANG_HOOKS_SIMULATE_ENUM_DECL
143#define LANG_HOOKS_SIMULATE_ENUM_DECL cxx_simulate_enum_decl
d5c6604f
RS
144#undef LANG_HOOKS_SIMULATE_RECORD_DECL
145#define LANG_HOOKS_SIMULATE_RECORD_DECL cxx_simulate_record_decl
11bb4b27
ZL
146#undef LANG_HOOKS_TYPE_FOR_MODE
147#define LANG_HOOKS_TYPE_FOR_MODE c_common_type_for_mode
148#undef LANG_HOOKS_TYPE_FOR_SIZE
149#define LANG_HOOKS_TYPE_FOR_SIZE c_common_type_for_size
11bb4b27
ZL
150#undef LANG_HOOKS_INCOMPLETE_TYPE_ERROR
151#define LANG_HOOKS_INCOMPLETE_TYPE_ERROR cxx_incomplete_type_error
152#undef LANG_HOOKS_TYPE_PROMOTES_TO
153#define LANG_HOOKS_TYPE_PROMOTES_TO cxx_type_promotes_to
154#undef LANG_HOOKS_REGISTER_BUILTIN_TYPE
155#define LANG_HOOKS_REGISTER_BUILTIN_TYPE c_register_builtin_type
5dc11954
JJ
156#undef LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE
157#define LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE cp_reconstruct_complex_type
6905c577
JJ
158#undef LANG_HOOKS_GET_DEBUG_TYPE
159#define LANG_HOOKS_GET_DEBUG_TYPE cp_get_debug_type
c5ff069d
ZW
160#undef LANG_HOOKS_TO_TARGET_CHARSET
161#define LANG_HOOKS_TO_TARGET_CHARSET c_common_to_target_charset
11bb4b27
ZL
162#undef LANG_HOOKS_GIMPLIFY_EXPR
163#define LANG_HOOKS_GIMPLIFY_EXPR cp_gimplify_expr
81b42cc6
JJ
164#undef LANG_HOOKS_DECL_DWARF_ATTRIBUTE
165#define LANG_HOOKS_DECL_DWARF_ATTRIBUTE cp_decl_dwarf_attribute
6905c577
JJ
166#undef LANG_HOOKS_TYPE_DWARF_ATTRIBUTE
167#define LANG_HOOKS_TYPE_DWARF_ATTRIBUTE cp_type_dwarf_attribute
b7fc43d7
RB
168#undef LANG_HOOKS_UNIT_SIZE_WITHOUT_REUSABLE_PADDING
169#define LANG_HOOKS_UNIT_SIZE_WITHOUT_REUSABLE_PADDING cp_unit_size_without_reusable_padding
170
1799e5d5
RH
171#undef LANG_HOOKS_OMP_PREDETERMINED_SHARING
172#define LANG_HOOKS_OMP_PREDETERMINED_SHARING cxx_omp_predetermined_sharing
93535a2b
TB
173#undef LANG_HOOKS_OMP_PREDETERMINED_MAPPING
174#define LANG_HOOKS_OMP_PREDETERMINED_MAPPING cxx_omp_predetermined_mapping
1799e5d5
RH
175#undef LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR
176#define LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR cxx_omp_clause_default_ctor
177#undef LANG_HOOKS_OMP_CLAUSE_COPY_CTOR
178#define LANG_HOOKS_OMP_CLAUSE_COPY_CTOR cxx_omp_clause_copy_ctor
179#undef LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP
180#define LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP cxx_omp_clause_assign_op
181#undef LANG_HOOKS_OMP_CLAUSE_DTOR
182#define LANG_HOOKS_OMP_CLAUSE_DTOR cxx_omp_clause_dtor
a68ab351
JJ
183#undef LANG_HOOKS_OMP_FINISH_CLAUSE
184#define LANG_HOOKS_OMP_FINISH_CLAUSE cxx_omp_finish_clause
077b0dfb
JJ
185#undef LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE
186#define LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE cxx_omp_privatize_by_reference
acf0174b
JJ
187#undef LANG_HOOKS_OMP_MAPPABLE_TYPE
188#define LANG_HOOKS_OMP_MAPPABLE_TYPE cp_omp_mappable_type
d9a6bd32
JJ
189#undef LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR
190#define LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR cxx_omp_disregard_value_expr
11bb4b27 191
384c400a
RH
192#undef LANG_HOOKS_EH_USE_CXA_END_CLEANUP
193#define LANG_HOOKS_EH_USE_CXA_END_CLEANUP true
194
3b06d379
SB
195#undef LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS
196#define LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS cp_protect_cleanup_actions
505dd180
NS
197
198#undef LANG_HOOKS_GETDECLS
199#define LANG_HOOKS_GETDECLS cp_get_global_decls
200#undef LANG_HOOKS_PUSHDECL
201#define LANG_HOOKS_PUSHDECL cp_pushdecl
11bb4b27 202#endif /* GCC_CP_OBJCP_COMMON */