1 /* Language hooks common to C++ and ObjC++ front ends.
2 Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
3 Contributed by Ziemowit Laski <zlaski@apple.com>
5 This file is part of GCC.
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 3, or (at your option) any later
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
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
21 #ifndef GCC_CP_OBJCP_COMMON
22 #define GCC_CP_OBJCP_COMMON
24 /* In cp/cp-lang.c and objcp/objcp-lang.c. */
26 extern tree
objcp_tsubst_copy_and_build (tree
, tree
, tsubst_flags_t
,
29 /* Lang hooks that are shared between C++ and ObjC++ are defined here. Hooks
30 specific to C++ or ObjC++ go in cp/cp-lang.c and objcp/objcp-lang.c,
33 #undef LANG_HOOKS_TREE_SIZE
34 #define LANG_HOOKS_TREE_SIZE cp_tree_size
35 #undef LANG_HOOKS_FINISH
36 #define LANG_HOOKS_FINISH cxx_finish
37 #undef LANG_HOOKS_CLEAR_BINDING_STACK
38 #define LANG_HOOKS_CLEAR_BINDING_STACK pop_everything
39 #undef LANG_HOOKS_INIT_OPTIONS
40 #define LANG_HOOKS_INIT_OPTIONS c_common_init_options
41 #undef LANG_HOOKS_INITIALIZE_DIAGNOSTICS
42 #define LANG_HOOKS_INITIALIZE_DIAGNOSTICS cxx_initialize_diagnostics
43 #undef LANG_HOOKS_HANDLE_OPTION
44 #define LANG_HOOKS_HANDLE_OPTION c_common_handle_option
45 #undef LANG_HOOKS_HANDLE_FILENAME
46 #define LANG_HOOKS_HANDLE_FILENAME c_common_handle_filename
47 #undef LANG_HOOKS_MISSING_ARGUMENT
48 #define LANG_HOOKS_MISSING_ARGUMENT c_common_missing_argument
49 #undef LANG_HOOKS_POST_OPTIONS
50 #define LANG_HOOKS_POST_OPTIONS c_common_post_options
51 #undef LANG_HOOKS_GET_ALIAS_SET
52 #define LANG_HOOKS_GET_ALIAS_SET cxx_get_alias_set
53 #undef LANG_HOOKS_EXPAND_CONSTANT
54 #define LANG_HOOKS_EXPAND_CONSTANT cplus_expand_constant
55 #undef LANG_HOOKS_EXPAND_EXPR
56 #define LANG_HOOKS_EXPAND_EXPR cxx_expand_expr
57 #undef LANG_HOOKS_EXPAND_DECL
58 #define LANG_HOOKS_EXPAND_DECL c_expand_decl
59 #undef LANG_HOOKS_PARSE_FILE
60 #define LANG_HOOKS_PARSE_FILE c_common_parse_file
61 #undef LANG_HOOKS_STATICP
62 #define LANG_HOOKS_STATICP cxx_staticp
63 #undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
64 #define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL cxx_dup_lang_specific_decl
65 #undef LANG_HOOKS_SET_DECL_ASSEMBLER_NAME
66 #define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME mangle_decl
67 #undef LANG_HOOKS_MARK_ADDRESSABLE
68 #define LANG_HOOKS_MARK_ADDRESSABLE cxx_mark_addressable
69 #undef LANG_HOOKS_PRINT_STATISTICS
70 #define LANG_HOOKS_PRINT_STATISTICS cxx_print_statistics
71 #undef LANG_HOOKS_PRINT_XNODE
72 #define LANG_HOOKS_PRINT_XNODE cxx_print_xnode
73 #undef LANG_HOOKS_PRINT_DECL
74 #define LANG_HOOKS_PRINT_DECL cxx_print_decl
75 #undef LANG_HOOKS_PRINT_TYPE
76 #define LANG_HOOKS_PRINT_TYPE cxx_print_type
77 #undef LANG_HOOKS_PRINT_IDENTIFIER
78 #define LANG_HOOKS_PRINT_IDENTIFIER cxx_print_identifier
79 #undef LANG_HOOKS_TYPES_COMPATIBLE_P
80 #define LANG_HOOKS_TYPES_COMPATIBLE_P cxx_types_compatible_p
81 #undef LANG_HOOKS_PRINT_ERROR_FUNCTION
82 #define LANG_HOOKS_PRINT_ERROR_FUNCTION cxx_print_error_function
83 #undef LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL
84 #define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL cxx_warn_unused_global_decl
85 #undef LANG_HOOKS_WRITE_GLOBALS
86 #define LANG_HOOKS_WRITE_GLOBALS cp_write_global_declarations
87 #undef LANG_HOOKS_COMDAT_GROUP
88 #define LANG_HOOKS_COMDAT_GROUP cxx_comdat_group
89 #undef LANG_HOOKS_BUILTIN_FUNCTION
90 #define LANG_HOOKS_BUILTIN_FUNCTION cxx_builtin_function
91 #undef LANG_HOOKS_TYPE_HASH_EQ
92 #define LANG_HOOKS_TYPE_HASH_EQ cxx_type_hash_eq
94 #undef LANG_HOOKS_FUNCTION_INIT
95 #define LANG_HOOKS_FUNCTION_INIT cxx_push_function_context
96 #undef LANG_HOOKS_FUNCTION_FINAL
97 #define LANG_HOOKS_FUNCTION_FINAL cxx_pop_function_context
98 #undef LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P
99 #define LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P cp_missing_noreturn_ok_p
101 /* Attribute hooks. */
102 #undef LANG_HOOKS_COMMON_ATTRIBUTE_TABLE
103 #define LANG_HOOKS_COMMON_ATTRIBUTE_TABLE c_common_attribute_table
104 #undef LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE
105 #define LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE c_common_format_attribute_table
106 #undef LANG_HOOKS_ATTRIBUTE_TABLE
107 #define LANG_HOOKS_ATTRIBUTE_TABLE cxx_attribute_table
109 #undef LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P
110 #define LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P cp_var_mod_type_p
111 #undef LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN
112 #define LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN cp_dump_tree
113 #undef LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN
114 #define LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN cp_type_quals
115 #undef LANG_HOOKS_EXPR_SIZE
116 #define LANG_HOOKS_EXPR_SIZE cp_expr_size
118 #undef LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR
119 #define LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR cxx_callgraph_analyze_expr
120 #undef LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS
121 #define LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS emit_associated_thunks
123 #undef LANG_HOOKS_MAKE_TYPE
124 #define LANG_HOOKS_MAKE_TYPE cxx_make_type
125 #undef LANG_HOOKS_TYPE_FOR_MODE
126 #define LANG_HOOKS_TYPE_FOR_MODE c_common_type_for_mode
127 #undef LANG_HOOKS_TYPE_FOR_SIZE
128 #define LANG_HOOKS_TYPE_FOR_SIZE c_common_type_for_size
129 #undef LANG_HOOKS_INCOMPLETE_TYPE_ERROR
130 #define LANG_HOOKS_INCOMPLETE_TYPE_ERROR cxx_incomplete_type_error
131 #undef LANG_HOOKS_TYPE_PROMOTES_TO
132 #define LANG_HOOKS_TYPE_PROMOTES_TO cxx_type_promotes_to
133 #undef LANG_HOOKS_REGISTER_BUILTIN_TYPE
134 #define LANG_HOOKS_REGISTER_BUILTIN_TYPE c_register_builtin_type
135 #undef LANG_HOOKS_TO_TARGET_CHARSET
136 #define LANG_HOOKS_TO_TARGET_CHARSET c_common_to_target_charset
137 #undef LANG_HOOKS_GIMPLIFY_EXPR
138 #define LANG_HOOKS_GIMPLIFY_EXPR cp_gimplify_expr
139 #undef LANG_HOOKS_OMP_PREDETERMINED_SHARING
140 #define LANG_HOOKS_OMP_PREDETERMINED_SHARING cxx_omp_predetermined_sharing
141 #undef LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR
142 #define LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR cxx_omp_clause_default_ctor
143 #undef LANG_HOOKS_OMP_CLAUSE_COPY_CTOR
144 #define LANG_HOOKS_OMP_CLAUSE_COPY_CTOR cxx_omp_clause_copy_ctor
145 #undef LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP
146 #define LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP cxx_omp_clause_assign_op
147 #undef LANG_HOOKS_OMP_CLAUSE_DTOR
148 #define LANG_HOOKS_OMP_CLAUSE_DTOR cxx_omp_clause_dtor
149 #undef LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE
150 #define LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE cxx_omp_privatize_by_reference
152 #endif /* GCC_CP_OBJCP_COMMON */