1 /* Stub functions for Objective-C and Objective-C++ routines
2 that are called from within the C and C++ front-ends,
4 Copyright (C) 1991-2023 Free Software Foundation, Inc.
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 3, or (at your option) any later
13 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. */
24 #include "coretypes.h"
28 #include "c-common.h" /* for enum rid. */
32 objc_is_class_name (tree
ARG_UNUSED (arg
))
38 objc_is_id (tree
ARG_UNUSED (arg
))
44 objc_is_object_ptr (tree
ARG_UNUSED (arg
))
49 bool objc_diagnose_private_ivar (tree
ARG_UNUSED (arg
))
55 objc_lookup_ivar (tree other
, tree
ARG_UNUSED (arg
))
57 /* Just use whatever C/C++ found. */
62 objc_check_decl (tree
ARG_UNUSED (decl
))
67 objc_check_global_decl (tree
ARG_UNUSED (decl
))
72 objc_common_type (tree
ARG_UNUSED (type1
), tree
ARG_UNUSED (type2
))
78 objc_compare_types (tree
ARG_UNUSED (ltyp
), tree
ARG_UNUSED (rtyp
),
79 int ARG_UNUSED (argno
), tree
ARG_UNUSED (callee
))
85 objc_have_common_type (tree
ARG_UNUSED (ltyp
), tree
ARG_UNUSED (rtyp
),
86 int ARG_UNUSED (argno
), tree
ARG_UNUSED (callee
))
92 objc_volatilize_decl (tree
ARG_UNUSED (decl
))
97 objc_rewrite_function_call (tree function
, tree
ARG_UNUSED (first_param
))
103 objc_message_selector (void)
109 objc_declare_alias (tree
ARG_UNUSED (alias
), tree
ARG_UNUSED (orig
))
114 objc_declare_class (tree
ARG_UNUSED (identifier
))
119 objc_declare_protocol (tree
ARG_UNUSED (name
), tree
ARG_UNUSED (attributes
))
124 objc_start_protocol (tree
ARG_UNUSED (proto
),
125 tree
ARG_UNUSED (protorefs
),
126 tree
ARG_UNUSED (attribs
))
131 objc_set_method_opt (bool ARG_UNUSED (optional
))
136 objc_start_class_interface (tree
ARG_UNUSED (name
),
137 location_t
/*name_loc*/,
138 tree
ARG_UNUSED (super
),
139 tree
ARG_UNUSED (protos
),
140 tree
ARG_UNUSED (attribs
))
145 objc_start_category_interface (tree
ARG_UNUSED (name
),
146 tree
ARG_UNUSED (categ
),
147 tree
ARG_UNUSED (protos
),
148 tree
ARG_UNUSED (attribs
))
153 objc_continue_interface (void)
158 objc_finish_interface (void)
163 objc_add_instance_variable (tree
ARG_UNUSED (decl
))
168 objc_set_visibility (objc_ivar_visibility_kind
ARG_UNUSED (vis
))
173 objc_start_class_implementation (tree
ARG_UNUSED (name
),
174 tree
ARG_UNUSED (super
))
179 objc_start_category_implementation (tree
ARG_UNUSED (name
),
180 tree
ARG_UNUSED (categ
))
185 objc_continue_implementation (void)
190 objc_clear_super_receiver (void)
195 objc_finish_implementation (void)
200 objc_add_method_declaration (bool ARG_UNUSED (is_class_method
),
201 tree
ARG_UNUSED (signature
),
202 tree
ARG_UNUSED (attributes
))
207 objc_start_method_definition (bool ARG_UNUSED (is_class_method
),
208 tree
ARG_UNUSED (signature
),
209 tree
ARG_UNUSED (attributes
),
210 tree
ARG_UNUSED (expr
))
216 objc_finish_method_definition (tree
ARG_UNUSED (fndecl
))
221 objc_method_decl (enum tree_code
ARG_UNUSED(opcode
))
227 objc_build_keyword_decl (tree
ARG_UNUSED (selector
),
228 tree
ARG_UNUSED (type
),
229 tree
ARG_UNUSED (identifier
),
230 tree
ARG_UNUSED (attributes
))
236 objc_build_method_signature (bool ARG_UNUSED (is_class_method
),
237 tree
ARG_UNUSED (rettype
),
238 tree
ARG_UNUSED (selectors
),
239 tree
ARG_UNUSED (optparms
),
240 bool ARG_UNUSED (ellipsis
))
246 objc_build_encode_expr (tree
ARG_UNUSED (expr
))
252 objc_build_protocol_expr (tree
ARG_UNUSED (expr
))
258 objc_build_selector_expr (location_t
ARG_UNUSED (loc
), tree
ARG_UNUSED (expr
))
264 objc_build_message_expr (tree
ARG_UNUSED (receiver
), tree
ARG_UNUSED (args
))
270 objc_build_string_object (tree
ARG_UNUSED (str
))
276 objc_get_class_reference (tree
ARG_UNUSED (name
))
282 objc_detect_field_duplicates (bool ARG_UNUSED (check_superclasses_only
))
288 objc_get_protocol_qualified_type (tree
ARG_UNUSED (name
),
289 tree
ARG_UNUSED (protos
))
295 objc_static_init_needed_p (void)
301 objc_generate_static_init_call (tree
ARG_UNUSED (ctors
))
307 objc_is_public (tree
ARG_UNUSED (expr
), tree
ARG_UNUSED (identifier
))
313 objc_get_class_ivars (tree
ARG_UNUSED (name
))
319 objc_add_property_declaration (location_t
ARG_UNUSED (location
),
320 tree
ARG_UNUSED (decl
),
321 vec
<property_attribute_info
*>&
327 objc_is_property_ref (tree
ARG_UNUSED (node
))
333 objc_non_constant_expr_p (tree
)
339 objc_maybe_build_component_ref (tree
ARG_UNUSED (datum
), tree
ARG_UNUSED (component
))
345 objc_build_class_component_ref (tree
ARG_UNUSED (datum
), tree
ARG_UNUSED (component
))
351 objc_maybe_build_modify_expr (tree
ARG_UNUSED (lhs
), tree
ARG_UNUSED (rhs
))
357 objc_build_incr_expr_for_property_ref (location_t
ARG_UNUSED (location
),
358 enum tree_code
ARG_UNUSED (code
),
359 tree
ARG_UNUSED (argument
),
360 tree
ARG_UNUSED (increment
))
366 objc_add_synthesize_declaration (location_t
ARG_UNUSED (start_locus
),
367 tree
ARG_UNUSED (property_and_ivar_list
))
372 objc_add_dynamic_declaration (location_t
ARG_UNUSED (start_locus
),
373 tree
ARG_UNUSED (property_list
))
378 objc_maybe_printable_name (tree
ARG_UNUSED (decl
),
385 objc_build_throw_stmt (location_t
ARG_UNUSED (loc
), tree
ARG_UNUSED (expr
))
391 objc_build_synchronized (location_t
ARG_UNUSED (start_locus
),
392 tree
ARG_UNUSED (mutex
), tree
ARG_UNUSED (body
))
398 objc_begin_try_stmt (location_t
ARG_UNUSED (try_locus
), tree
ARG_UNUSED (body
))
403 objc_begin_catch_clause (tree
ARG_UNUSED (decl
))
408 objc_finish_catch_clause (void)
413 objc_build_finally_clause (location_t
ARG_UNUSED (finally_locus
),
414 tree
ARG_UNUSED (body
))
419 objc_finish_try_stmt (void)
425 objc_generate_write_barrier (tree
ARG_UNUSED (lhs
),
426 enum tree_code
ARG_UNUSED (modifycode
),
427 tree
ARG_UNUSED (rhs
))
433 objc_finish_foreach_loop (location_t
ARG_UNUSED (location
), tree
ARG_UNUSED (object_expression
),
434 tree
ARG_UNUSED (collection_expression
), tree
ARG_UNUSED (for_body
),
435 tree
ARG_UNUSED (break_label
), tree
ARG_UNUSED (continue_label
))
441 objc_write_global_declarations (void)
446 objc_string_ref_type_p (tree
ARG_UNUSED (strp
))
452 objc_check_format_arg (tree
ARG_UNUSED (format_arg
),
453 tree
ARG_UNUSED (args_list
))
458 objc_finish_function (void)
463 objc_maybe_warn_exceptions (location_t
ARG_UNUSED (loc
))
467 enum objc_property_attribute_kind
objc_prop_attr_kind_for_rid (enum rid
)
469 return OBJC_PROPERTY_ATTR_UNKNOWN
;