1 /* Language hooks common to C++ and ObjC++ front ends. 2 Copyright (C) 2004-2013 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 3, 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 COPYING3. If not see 19 <http://www.gnu.org/licenses/>. */ 20 21 #ifndef GCC_CP_OBJCP_COMMON 22 #define GCC_CP_OBJCP_COMMON 23 24 /* In cp/cp-lang.c and objcp/objcp-lang.c. */ 25 26 extern tree objcp_tsubst_copy_and_build (tree, tree, tsubst_flags_t, 27 tree, bool); 28 29 extern bool cp_function_decl_explicit_p (tree decl); 30 extern void cp_common_init_ts (void); 31 32 /* Lang hooks that are shared between C++ and ObjC++ are defined here. Hooks 33 specific to C++ or ObjC++ go in cp/cp-lang.c and objcp/objcp-lang.c, 34 respectively. */ 35 36 #undef LANG_HOOKS_FREE_LANG_DATA 37 #define LANG_HOOKS_FREE_LANG_DATA cp_free_lang_data 38 #undef LANG_HOOKS_TREE_SIZE 39 #define LANG_HOOKS_TREE_SIZE cp_tree_size 40 #undef LANG_HOOKS_FINISH 41 #define LANG_HOOKS_FINISH cxx_finish 42 #undef LANG_HOOKS_CLEAR_BINDING_STACK 43 #define LANG_HOOKS_CLEAR_BINDING_STACK pop_everything 44 #undef LANG_HOOKS_OPTION_LANG_MASK 45 #define LANG_HOOKS_OPTION_LANG_MASK c_common_option_lang_mask 46 #undef LANG_HOOKS_COMPLAIN_WRONG_LANG_P 47 #define LANG_HOOKS_COMPLAIN_WRONG_LANG_P c_common_complain_wrong_lang_p 48 #undef LANG_HOOKS_INIT_OPTIONS_STRUCT 49 #define LANG_HOOKS_INIT_OPTIONS_STRUCT c_common_init_options_struct 50 #undef LANG_HOOKS_INIT_OPTIONS 51 #define LANG_HOOKS_INIT_OPTIONS c_common_init_options 52 #undef LANG_HOOKS_INITIALIZE_DIAGNOSTICS 53 #define LANG_HOOKS_INITIALIZE_DIAGNOSTICS cxx_initialize_diagnostics 54 #undef LANG_HOOKS_HANDLE_OPTION 55 #define LANG_HOOKS_HANDLE_OPTION c_common_handle_option 56 #undef LANG_HOOKS_HANDLE_FILENAME 57 #define LANG_HOOKS_HANDLE_FILENAME c_common_handle_filename 58 #undef LANG_HOOKS_POST_OPTIONS 59 #define LANG_HOOKS_POST_OPTIONS c_common_post_options 60 #undef LANG_HOOKS_GET_ALIAS_SET 61 #define LANG_HOOKS_GET_ALIAS_SET cxx_get_alias_set 62 #undef LANG_HOOKS_PARSE_FILE 63 #define LANG_HOOKS_PARSE_FILE c_common_parse_file 64 #undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL 65 #define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL cxx_dup_lang_specific_decl 66 #undef LANG_HOOKS_SET_DECL_ASSEMBLER_NAME 67 #define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME mangle_decl 68 #undef LANG_HOOKS_PRINT_STATISTICS 69 #define LANG_HOOKS_PRINT_STATISTICS cxx_print_statistics 70 #undef LANG_HOOKS_PRINT_XNODE 71 #define LANG_HOOKS_PRINT_XNODE cxx_print_xnode 72 #undef LANG_HOOKS_DECL_PRINTABLE_NAME 73 #define LANG_HOOKS_DECL_PRINTABLE_NAME cxx_printable_name 74 #undef LANG_HOOKS_PRINT_DECL 75 #define LANG_HOOKS_PRINT_DECL cxx_print_decl 76 #undef LANG_HOOKS_PRINT_TYPE 77 #define LANG_HOOKS_PRINT_TYPE cxx_print_type 78 #undef LANG_HOOKS_PRINT_IDENTIFIER 79 #define LANG_HOOKS_PRINT_IDENTIFIER cxx_print_identifier 80 #undef LANG_HOOKS_TYPES_COMPATIBLE_P 81 #define LANG_HOOKS_TYPES_COMPATIBLE_P cxx_types_compatible_p 82 #undef LANG_HOOKS_PRINT_ERROR_FUNCTION 83 #define LANG_HOOKS_PRINT_ERROR_FUNCTION cxx_print_error_function 84 #undef LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL 85 #define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL cxx_warn_unused_global_decl 86 #undef LANG_HOOKS_WRITE_GLOBALS 87 #define LANG_HOOKS_WRITE_GLOBALS cp_write_global_declarations 88 #undef LANG_HOOKS_BUILTIN_FUNCTION 89 #define LANG_HOOKS_BUILTIN_FUNCTION cxx_builtin_function 90 #undef LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE 91 #define LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE cxx_builtin_function_ext_scope 92 #undef LANG_HOOKS_TYPE_HASH_EQ 93 #define LANG_HOOKS_TYPE_HASH_EQ cxx_type_hash_eq 94 #undef LANG_HOOKS_MISSING_NORETURN_OK_P 95 #define LANG_HOOKS_MISSING_NORETURN_OK_P cp_missing_noreturn_ok_p 96 #undef LANG_HOOKS_BLOCK_MAY_FALLTHRU 97 #define LANG_HOOKS_BLOCK_MAY_FALLTHRU cxx_block_may_fallthru 98 99 /* Attribute hooks. */ 100 #undef LANG_HOOKS_COMMON_ATTRIBUTE_TABLE 101 #define LANG_HOOKS_COMMON_ATTRIBUTE_TABLE c_common_attribute_table 102 #undef LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE 103 #define LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE c_common_format_attribute_table 104 #undef LANG_HOOKS_ATTRIBUTE_TABLE 105 #define LANG_HOOKS_ATTRIBUTE_TABLE cxx_attribute_table 106 107 #undef LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P 108 #define LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P cp_var_mod_type_p 109 #undef LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN 110 #define LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN cp_dump_tree 111 #undef LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN 112 #define LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN cp_type_quals 113 114 #undef LANG_HOOKS_MAKE_TYPE 115 #define LANG_HOOKS_MAKE_TYPE cxx_make_type 116 #undef LANG_HOOKS_TYPE_FOR_MODE 117 #define LANG_HOOKS_TYPE_FOR_MODE c_common_type_for_mode 118 #undef LANG_HOOKS_TYPE_FOR_SIZE 119 #define LANG_HOOKS_TYPE_FOR_SIZE c_common_type_for_size 120 #undef LANG_HOOKS_INCOMPLETE_TYPE_ERROR 121 #define LANG_HOOKS_INCOMPLETE_TYPE_ERROR cxx_incomplete_type_error 122 #undef LANG_HOOKS_TYPE_PROMOTES_TO 123 #define LANG_HOOKS_TYPE_PROMOTES_TO cxx_type_promotes_to 124 #undef LANG_HOOKS_REGISTER_BUILTIN_TYPE 125 #define LANG_HOOKS_REGISTER_BUILTIN_TYPE c_register_builtin_type 126 #undef LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE 127 #define LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE cp_reconstruct_complex_type 128 #undef LANG_HOOKS_TO_TARGET_CHARSET 129 #define LANG_HOOKS_TO_TARGET_CHARSET c_common_to_target_charset 130 #undef LANG_HOOKS_GIMPLIFY_EXPR 131 #define LANG_HOOKS_GIMPLIFY_EXPR cp_gimplify_expr 132 #undef LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P 133 #define LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P cp_function_decl_explicit_p 134 #undef LANG_HOOKS_OMP_PREDETERMINED_SHARING 135 #define LANG_HOOKS_OMP_PREDETERMINED_SHARING cxx_omp_predetermined_sharing 136 #undef LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR 137 #define LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR cxx_omp_clause_default_ctor 138 #undef LANG_HOOKS_OMP_CLAUSE_COPY_CTOR 139 #define LANG_HOOKS_OMP_CLAUSE_COPY_CTOR cxx_omp_clause_copy_ctor 140 #undef LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP 141 #define LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP cxx_omp_clause_assign_op 142 #undef LANG_HOOKS_OMP_CLAUSE_DTOR 143 #define LANG_HOOKS_OMP_CLAUSE_DTOR cxx_omp_clause_dtor 144 #undef LANG_HOOKS_OMP_FINISH_CLAUSE 145 #define LANG_HOOKS_OMP_FINISH_CLAUSE cxx_omp_finish_clause 146 #undef LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE 147 #define LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE cxx_omp_privatize_by_reference 148 149 #undef LANG_HOOKS_EH_USE_CXA_END_CLEANUP 150 #define LANG_HOOKS_EH_USE_CXA_END_CLEANUP true 151 152 #undef LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS 153 #define LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS cp_protect_cleanup_actions 154 155 #endif /* GCC_CP_OBJCP_COMMON */ 156