xref: /dflybsd-src/contrib/gcc-4.7/gcc/cp/cp-objcp-common.h (revision 81fc95a5293ee307c688a350a3feb4734aaddbb4)
1e4b17023SJohn Marino /* Language hooks common to C++ and ObjC++ front ends.
2e4b17023SJohn Marino    Copyright (C) 2004, 2005, 2007, 2008, 2009, 2010
3e4b17023SJohn Marino    Free Software Foundation, Inc.
4e4b17023SJohn Marino    Contributed by Ziemowit Laski  <zlaski@apple.com>
5e4b17023SJohn Marino 
6e4b17023SJohn Marino This file is part of GCC.
7e4b17023SJohn Marino 
8e4b17023SJohn Marino GCC is free software; you can redistribute it and/or modify it under
9e4b17023SJohn Marino the terms of the GNU General Public License as published by the Free
10e4b17023SJohn Marino Software Foundation; either version 3, or (at your option) any later
11e4b17023SJohn Marino version.
12e4b17023SJohn Marino 
13e4b17023SJohn Marino GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14e4b17023SJohn Marino WARRANTY; without even the implied warranty of MERCHANTABILITY or
15e4b17023SJohn Marino FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
16e4b17023SJohn Marino for more details.
17e4b17023SJohn Marino 
18e4b17023SJohn Marino You should have received a copy of the GNU General Public License
19e4b17023SJohn Marino along with GCC; see the file COPYING3.  If not see
20e4b17023SJohn Marino <http://www.gnu.org/licenses/>.  */
21e4b17023SJohn Marino 
22e4b17023SJohn Marino #ifndef GCC_CP_OBJCP_COMMON
23e4b17023SJohn Marino #define GCC_CP_OBJCP_COMMON
24e4b17023SJohn Marino 
25e4b17023SJohn Marino /* In cp/cp-lang.c and objcp/objcp-lang.c.  */
26e4b17023SJohn Marino 
27e4b17023SJohn Marino extern tree objcp_tsubst_copy_and_build (tree, tree, tsubst_flags_t,
28e4b17023SJohn Marino 					 tree, bool);
29e4b17023SJohn Marino 
30e4b17023SJohn Marino extern bool cp_function_decl_explicit_p (tree decl);
31e4b17023SJohn Marino extern void cp_common_init_ts (void);
32e4b17023SJohn Marino 
33e4b17023SJohn Marino /* Lang hooks that are shared between C++ and ObjC++ are defined here.  Hooks
34e4b17023SJohn Marino    specific to C++ or ObjC++ go in cp/cp-lang.c and objcp/objcp-lang.c,
35e4b17023SJohn Marino    respectively.  */
36e4b17023SJohn Marino 
37e4b17023SJohn Marino #undef LANG_HOOKS_FREE_LANG_DATA
38e4b17023SJohn Marino #define LANG_HOOKS_FREE_LANG_DATA cp_free_lang_data
39e4b17023SJohn Marino #undef LANG_HOOKS_TREE_SIZE
40e4b17023SJohn Marino #define LANG_HOOKS_TREE_SIZE cp_tree_size
41e4b17023SJohn Marino #undef LANG_HOOKS_FINISH
42e4b17023SJohn Marino #define LANG_HOOKS_FINISH cxx_finish
43e4b17023SJohn Marino #undef LANG_HOOKS_CLEAR_BINDING_STACK
44e4b17023SJohn Marino #define LANG_HOOKS_CLEAR_BINDING_STACK pop_everything
45e4b17023SJohn Marino #undef LANG_HOOKS_OPTION_LANG_MASK
46e4b17023SJohn Marino #define LANG_HOOKS_OPTION_LANG_MASK c_common_option_lang_mask
47e4b17023SJohn Marino #undef LANG_HOOKS_COMPLAIN_WRONG_LANG_P
48e4b17023SJohn Marino #define LANG_HOOKS_COMPLAIN_WRONG_LANG_P c_common_complain_wrong_lang_p
49e4b17023SJohn Marino #undef LANG_HOOKS_INIT_OPTIONS_STRUCT
50e4b17023SJohn Marino #define LANG_HOOKS_INIT_OPTIONS_STRUCT c_common_init_options_struct
51e4b17023SJohn Marino #undef LANG_HOOKS_INIT_OPTIONS
52e4b17023SJohn Marino #define LANG_HOOKS_INIT_OPTIONS c_common_init_options
53e4b17023SJohn Marino #undef LANG_HOOKS_INITIALIZE_DIAGNOSTICS
54e4b17023SJohn Marino #define LANG_HOOKS_INITIALIZE_DIAGNOSTICS cxx_initialize_diagnostics
55e4b17023SJohn Marino #undef LANG_HOOKS_HANDLE_OPTION
56e4b17023SJohn Marino #define LANG_HOOKS_HANDLE_OPTION c_common_handle_option
57e4b17023SJohn Marino #undef LANG_HOOKS_HANDLE_FILENAME
58e4b17023SJohn Marino #define LANG_HOOKS_HANDLE_FILENAME c_common_handle_filename
59e4b17023SJohn Marino #undef LANG_HOOKS_POST_OPTIONS
60e4b17023SJohn Marino #define LANG_HOOKS_POST_OPTIONS c_common_post_options
61e4b17023SJohn Marino #undef LANG_HOOKS_GET_ALIAS_SET
62e4b17023SJohn Marino #define LANG_HOOKS_GET_ALIAS_SET cxx_get_alias_set
63e4b17023SJohn Marino #undef LANG_HOOKS_PARSE_FILE
64e4b17023SJohn Marino #define LANG_HOOKS_PARSE_FILE c_common_parse_file
65e4b17023SJohn Marino #undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
66e4b17023SJohn Marino #define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL cxx_dup_lang_specific_decl
67e4b17023SJohn Marino #undef LANG_HOOKS_SET_DECL_ASSEMBLER_NAME
68e4b17023SJohn Marino #define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME mangle_decl
69e4b17023SJohn Marino #undef LANG_HOOKS_PRINT_STATISTICS
70e4b17023SJohn Marino #define LANG_HOOKS_PRINT_STATISTICS cxx_print_statistics
71e4b17023SJohn Marino #undef LANG_HOOKS_PRINT_XNODE
72e4b17023SJohn Marino #define LANG_HOOKS_PRINT_XNODE cxx_print_xnode
73e4b17023SJohn Marino #undef LANG_HOOKS_DECL_PRINTABLE_NAME
74e4b17023SJohn Marino #define LANG_HOOKS_DECL_PRINTABLE_NAME	cxx_printable_name
75e4b17023SJohn Marino #undef LANG_HOOKS_PRINT_DECL
76e4b17023SJohn Marino #define LANG_HOOKS_PRINT_DECL cxx_print_decl
77e4b17023SJohn Marino #undef LANG_HOOKS_PRINT_TYPE
78e4b17023SJohn Marino #define LANG_HOOKS_PRINT_TYPE cxx_print_type
79e4b17023SJohn Marino #undef LANG_HOOKS_PRINT_IDENTIFIER
80e4b17023SJohn Marino #define LANG_HOOKS_PRINT_IDENTIFIER cxx_print_identifier
81e4b17023SJohn Marino #undef LANG_HOOKS_TYPES_COMPATIBLE_P
82e4b17023SJohn Marino #define LANG_HOOKS_TYPES_COMPATIBLE_P cxx_types_compatible_p
83e4b17023SJohn Marino #undef LANG_HOOKS_PRINT_ERROR_FUNCTION
84e4b17023SJohn Marino #define LANG_HOOKS_PRINT_ERROR_FUNCTION	cxx_print_error_function
85e4b17023SJohn Marino #undef LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL
86e4b17023SJohn Marino #define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL cxx_warn_unused_global_decl
87e4b17023SJohn Marino #undef LANG_HOOKS_WRITE_GLOBALS
88e4b17023SJohn Marino #define LANG_HOOKS_WRITE_GLOBALS cp_write_global_declarations
89e4b17023SJohn Marino #undef  LANG_HOOKS_BUILTIN_FUNCTION
90e4b17023SJohn Marino #define LANG_HOOKS_BUILTIN_FUNCTION cxx_builtin_function
91e4b17023SJohn Marino #undef  LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE
92e4b17023SJohn Marino #define LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE cxx_builtin_function_ext_scope
93e4b17023SJohn Marino #undef	LANG_HOOKS_TYPE_HASH_EQ
94e4b17023SJohn Marino #define LANG_HOOKS_TYPE_HASH_EQ	cxx_type_hash_eq
95e4b17023SJohn Marino #undef LANG_HOOKS_MISSING_NORETURN_OK_P
96e4b17023SJohn Marino #define LANG_HOOKS_MISSING_NORETURN_OK_P cp_missing_noreturn_ok_p
97*5ce9237cSJohn Marino #undef LANG_HOOKS_BLOCK_MAY_FALLTHRU
98*5ce9237cSJohn Marino #define LANG_HOOKS_BLOCK_MAY_FALLTHRU cxx_block_may_fallthru
99e4b17023SJohn Marino 
100e4b17023SJohn Marino /* Attribute hooks.  */
101e4b17023SJohn Marino #undef LANG_HOOKS_COMMON_ATTRIBUTE_TABLE
102e4b17023SJohn Marino #define LANG_HOOKS_COMMON_ATTRIBUTE_TABLE c_common_attribute_table
103e4b17023SJohn Marino #undef LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE
104e4b17023SJohn Marino #define LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE c_common_format_attribute_table
105e4b17023SJohn Marino #undef LANG_HOOKS_ATTRIBUTE_TABLE
106e4b17023SJohn Marino #define LANG_HOOKS_ATTRIBUTE_TABLE cxx_attribute_table
107e4b17023SJohn Marino 
108e4b17023SJohn Marino #undef LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P
109e4b17023SJohn Marino #define LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P cp_var_mod_type_p
110e4b17023SJohn Marino #undef LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN
111e4b17023SJohn Marino #define LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN cp_dump_tree
112e4b17023SJohn Marino #undef LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN
113e4b17023SJohn Marino #define LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN cp_type_quals
114e4b17023SJohn Marino 
115e4b17023SJohn Marino #undef LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR
116e4b17023SJohn Marino #define LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR cxx_callgraph_analyze_expr
117e4b17023SJohn Marino 
118e4b17023SJohn Marino #undef LANG_HOOKS_MAKE_TYPE
119e4b17023SJohn Marino #define LANG_HOOKS_MAKE_TYPE cxx_make_type
120e4b17023SJohn Marino #undef LANG_HOOKS_TYPE_FOR_MODE
121e4b17023SJohn Marino #define LANG_HOOKS_TYPE_FOR_MODE c_common_type_for_mode
122e4b17023SJohn Marino #undef LANG_HOOKS_TYPE_FOR_SIZE
123e4b17023SJohn Marino #define LANG_HOOKS_TYPE_FOR_SIZE c_common_type_for_size
124e4b17023SJohn Marino #undef LANG_HOOKS_INCOMPLETE_TYPE_ERROR
125e4b17023SJohn Marino #define LANG_HOOKS_INCOMPLETE_TYPE_ERROR cxx_incomplete_type_error
126e4b17023SJohn Marino #undef LANG_HOOKS_TYPE_PROMOTES_TO
127e4b17023SJohn Marino #define LANG_HOOKS_TYPE_PROMOTES_TO cxx_type_promotes_to
128e4b17023SJohn Marino #undef LANG_HOOKS_REGISTER_BUILTIN_TYPE
129e4b17023SJohn Marino #define LANG_HOOKS_REGISTER_BUILTIN_TYPE c_register_builtin_type
130e4b17023SJohn Marino #undef LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE
131e4b17023SJohn Marino #define LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE cp_reconstruct_complex_type
132e4b17023SJohn Marino #undef LANG_HOOKS_TO_TARGET_CHARSET
133e4b17023SJohn Marino #define LANG_HOOKS_TO_TARGET_CHARSET c_common_to_target_charset
134e4b17023SJohn Marino #undef LANG_HOOKS_GIMPLIFY_EXPR
135e4b17023SJohn Marino #define LANG_HOOKS_GIMPLIFY_EXPR cp_gimplify_expr
136e4b17023SJohn Marino #undef LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P
137e4b17023SJohn Marino #define LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P cp_function_decl_explicit_p
138e4b17023SJohn Marino #undef LANG_HOOKS_OMP_PREDETERMINED_SHARING
139e4b17023SJohn Marino #define LANG_HOOKS_OMP_PREDETERMINED_SHARING cxx_omp_predetermined_sharing
140e4b17023SJohn Marino #undef LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR
141e4b17023SJohn Marino #define LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR cxx_omp_clause_default_ctor
142e4b17023SJohn Marino #undef LANG_HOOKS_OMP_CLAUSE_COPY_CTOR
143e4b17023SJohn Marino #define LANG_HOOKS_OMP_CLAUSE_COPY_CTOR cxx_omp_clause_copy_ctor
144e4b17023SJohn Marino #undef LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP
145e4b17023SJohn Marino #define LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP cxx_omp_clause_assign_op
146e4b17023SJohn Marino #undef LANG_HOOKS_OMP_CLAUSE_DTOR
147e4b17023SJohn Marino #define LANG_HOOKS_OMP_CLAUSE_DTOR cxx_omp_clause_dtor
148e4b17023SJohn Marino #undef LANG_HOOKS_OMP_FINISH_CLAUSE
149e4b17023SJohn Marino #define LANG_HOOKS_OMP_FINISH_CLAUSE cxx_omp_finish_clause
150e4b17023SJohn Marino #undef LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE
151e4b17023SJohn Marino #define LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE cxx_omp_privatize_by_reference
152e4b17023SJohn Marino 
153e4b17023SJohn Marino #undef LANG_HOOKS_EH_USE_CXA_END_CLEANUP
154e4b17023SJohn Marino #define LANG_HOOKS_EH_USE_CXA_END_CLEANUP true
155e4b17023SJohn Marino 
156e4b17023SJohn Marino #undef LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS
157e4b17023SJohn Marino #define LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS cp_protect_cleanup_actions
158e4b17023SJohn Marino 
159e4b17023SJohn Marino #endif /* GCC_CP_OBJCP_COMMON */
160