c-objc.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /* Definitions of Objective-C front-end entry points used for C and C++.
  2. Copyright (C) 1987-2015 Free Software Foundation, Inc.
  3. This file is part of GCC.
  4. GCC is free software; you can redistribute it and/or modify it under
  5. the terms of the GNU General Public License as published by the Free
  6. Software Foundation; either version 3, or (at your option) any later
  7. version.
  8. GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  9. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  11. for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GCC; see the file COPYING3. If not see
  14. <http://www.gnu.org/licenses/>. */
  15. #ifndef GCC_C_COMMON_OBJC_H
  16. #define GCC_C_COMMON_OBJC_H
  17. /* ObjC ivar visibility types. */
  18. typedef enum objc_ivar_visibility_kind {
  19. OBJC_IVAR_VIS_PROTECTED = 0,
  20. OBJC_IVAR_VIS_PUBLIC = 1,
  21. OBJC_IVAR_VIS_PRIVATE = 2,
  22. OBJC_IVAR_VIS_PACKAGE = 3
  23. } objc_ivar_visibility_kind;
  24. /* Objective-C / Objective-C++ entry points. */
  25. /* The following ObjC/ObjC++ functions are called by the C and/or C++
  26. front-ends; they all must have corresponding stubs in stub-objc.c. */
  27. extern void objc_write_global_declarations (void);
  28. extern tree objc_is_class_name (tree);
  29. extern tree objc_is_object_ptr (tree);
  30. extern void objc_check_decl (tree);
  31. extern void objc_check_global_decl (tree);
  32. extern tree objc_common_type (tree, tree);
  33. extern bool objc_compare_types (tree, tree, int, tree);
  34. extern bool objc_have_common_type (tree, tree, int, tree);
  35. extern bool objc_diagnose_private_ivar (tree);
  36. extern void objc_volatilize_decl (tree);
  37. extern tree objc_rewrite_function_call (tree, tree);
  38. extern tree objc_message_selector (void);
  39. extern tree objc_lookup_ivar (tree, tree);
  40. extern void objc_clear_super_receiver (void);
  41. extern int objc_is_public (tree, tree);
  42. extern tree objc_is_id (tree);
  43. extern void objc_declare_alias (tree, tree);
  44. extern void objc_declare_class (tree);
  45. extern void objc_declare_protocol (tree, tree);
  46. extern tree objc_build_message_expr (tree, tree);
  47. extern tree objc_finish_message_expr (tree, tree, tree, tree*);
  48. extern tree objc_build_selector_expr (location_t, tree);
  49. extern tree objc_build_protocol_expr (tree);
  50. extern tree objc_build_encode_expr (tree);
  51. extern tree objc_build_string_object (tree);
  52. extern tree objc_get_protocol_qualified_type (tree, tree);
  53. extern tree objc_get_class_reference (tree);
  54. extern tree objc_get_class_ivars (tree);
  55. extern bool objc_detect_field_duplicates (bool);
  56. extern void objc_start_class_interface (tree, tree, tree, tree);
  57. extern void objc_start_category_interface (tree, tree, tree, tree);
  58. extern void objc_start_protocol (tree, tree, tree);
  59. extern void objc_continue_interface (void);
  60. extern void objc_finish_interface (void);
  61. extern void objc_start_class_implementation (tree, tree);
  62. extern void objc_start_category_implementation (tree, tree);
  63. extern void objc_continue_implementation (void);
  64. extern void objc_finish_implementation (void);
  65. extern void objc_set_visibility (objc_ivar_visibility_kind);
  66. extern tree objc_build_method_signature (bool, tree, tree, tree, bool);
  67. extern void objc_add_method_declaration (bool, tree, tree);
  68. extern bool objc_start_method_definition (bool, tree, tree, tree);
  69. extern void objc_finish_method_definition (tree);
  70. extern void objc_add_instance_variable (tree);
  71. extern tree objc_build_keyword_decl (tree, tree, tree, tree);
  72. extern tree objc_build_throw_stmt (location_t, tree);
  73. extern void objc_begin_try_stmt (location_t, tree);
  74. extern tree objc_finish_try_stmt (void);
  75. extern void objc_begin_catch_clause (tree);
  76. extern void objc_finish_catch_clause (void);
  77. extern void objc_build_finally_clause (location_t, tree);
  78. extern tree objc_build_synchronized (location_t, tree, tree);
  79. extern int objc_static_init_needed_p (void);
  80. extern tree objc_generate_static_init_call (tree);
  81. extern tree objc_generate_write_barrier (tree, enum tree_code, tree);
  82. extern void objc_set_method_opt (bool);
  83. extern void objc_finish_foreach_loop (location_t, tree, tree, tree, tree, tree);
  84. extern bool objc_method_decl (enum tree_code);
  85. extern void objc_add_property_declaration (location_t, tree, bool, bool, bool,
  86. bool, bool, bool, tree, tree);
  87. extern tree objc_maybe_build_component_ref (tree, tree);
  88. extern tree objc_build_class_component_ref (tree, tree);
  89. extern tree objc_maybe_build_modify_expr (tree, tree);
  90. extern tree objc_build_incr_expr_for_property_ref (location_t, enum tree_code,
  91. tree, tree);
  92. extern void objc_add_synthesize_declaration (location_t, tree);
  93. extern void objc_add_dynamic_declaration (location_t, tree);
  94. extern const char * objc_maybe_printable_name (tree, int);
  95. extern bool objc_is_property_ref (tree);
  96. extern bool objc_string_ref_type_p (tree);
  97. extern void objc_check_format_arg (tree, tree);
  98. extern void objc_finish_function (void);
  99. extern void objc_maybe_warn_exceptions (location_t);
  100. /* The following are provided by the C and C++ front-ends, and called by
  101. ObjC/ObjC++. */
  102. extern void *objc_get_current_scope (void);
  103. extern void objc_mark_locals_volatile (void *);
  104. #endif /* ! GCC_C_COMMON_OBJC_H */