cp-objcp-common.h 6.8 KB

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