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, 1995, 1997, 1998,
5 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
7 This file is part of GCC.
9 GCC is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free
11 Software Foundation; either version 2, or (at your option) any later
14 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 You should have received a copy of the GNU General Public License
20 along with GCC; see the file COPYING. If not, write to the Free
21 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
26 #include "coretypes.h"
31 objc_is_class_name (tree ARG_UNUSED (arg))
37 objc_is_id (tree ARG_UNUSED (arg))
43 objc_is_object_ptr (tree ARG_UNUSED (arg))
48 /* APPLE LOCAL begin radar 4133425 */
49 bool objc_diagnose_private_ivar (tree ARG_UNUSED (arg))
53 /* APPLE LOCAL end radar 4133425 */
56 objc_lookup_ivar (tree other, tree ARG_UNUSED (arg))
58 /* Just use whatever C/C++ found. */
63 objc_check_decl (tree ARG_UNUSED (decl))
67 /* APPLE LOCAL begin radar 4281748 */
69 objc_check_global_decl (tree ARG_UNUSED (decl))
72 /* APPLE LOCAL end radar 4281748 */
74 /* APPLE LOCAL begin radar 4330422 */
76 objc_non_volatilized_type (tree type)
80 /* APPLE LOCAL end radar 4330422 */
82 /* APPLE LOCAL begin radar 4697411 */
84 objc_volatilize_component_ref (tree ARG_UNUSED (cref), tree ARG_UNUSED (type))
87 /* APPLE LOCAL end radar 4697411 */
90 objc_is_reserved_word (tree ARG_UNUSED (ident))
95 /* APPLE LOCAL begin 4154928 */
97 objc_common_type (tree ARG_UNUSED (type1), tree ARG_UNUSED (type2))
101 /* APPLE LOCAL end 4154928 */
104 objc_compare_types (tree ARG_UNUSED (ltyp), tree ARG_UNUSED (rtyp),
105 /* APPLE LOCAL begin radar 6231433 */
106 int ARG_UNUSED (argno), tree ARG_UNUSED (callee),
107 const char * ARG_UNUSED (message))
108 /* APPLE LOCAL end radar 6231433 */
113 /* APPLE LOCAL begin radar 4229905 - radar 6231433 */
115 objc_have_common_type (tree ARG_UNUSED (ltyp), tree ARG_UNUSED (rtyp),
116 int ARG_UNUSED (argno), tree ARG_UNUSED (callee),
117 const char * ARG_UNUSED (message))
121 /* APPLE LOCAL end radar 4229905 - radar 6231433 */
124 objc_volatilize_decl (tree ARG_UNUSED (decl))
129 objc_type_quals_match (tree ARG_UNUSED (ltyp), tree ARG_UNUSED (rtyp))
135 objc_rewrite_function_call (tree function, tree ARG_UNUSED (params))
141 objc_message_selector (void)
147 objc_declare_alias (tree ARG_UNUSED (alias), tree ARG_UNUSED (orig))
152 objc_declare_class (tree ARG_UNUSED (list))
157 /* APPLE LOCAL begin radar 4947311 - protocol attributes */
158 objc_declare_protocols (tree ARG_UNUSED (list), tree ARG_UNUSED (attributes))
163 objc_start_protocol (tree ARG_UNUSED (proto),
164 tree ARG_UNUSED (protorefs),
165 tree ARG_UNUSED (attributes))
168 /* APPLE LOCAL end radar 4947311 - protocol attributes */
171 objc_start_class_interface (tree ARG_UNUSED (name),
172 tree ARG_UNUSED (super),
173 /* APPLE LOCAL begin radar 4548636 */
174 tree ARG_UNUSED (protos),
175 tree ARG_UNUSED (attributes))
176 /* APPLE LOCAL end radar 4548636 */
181 objc_start_category_interface (tree ARG_UNUSED (name),
182 tree ARG_UNUSED (categ),
183 tree ARG_UNUSED (protos))
188 objc_continue_interface (void)
193 objc_finish_interface (void)
198 objc_add_instance_variable (tree ARG_UNUSED (decl))
203 objc_set_visibility (int ARG_UNUSED (vis))
208 objc_set_method_type (enum tree_code ARG_UNUSED (code))
213 objc_start_class_implementation (tree ARG_UNUSED (name),
214 tree ARG_UNUSED (super))
219 objc_start_category_implementation (tree ARG_UNUSED (name),
220 tree ARG_UNUSED (categ))
225 objc_continue_implementation (void)
230 objc_clear_super_receiver (void)
235 objc_finish_implementation (void)
240 /* APPLE LOCAL begin radar 3803157 - objc attribute */
241 objc_add_method_declaration (tree ARG_UNUSED (signature),
242 tree ARG_UNUSED (attribute))
243 /* APPLE LOCAL end radar 3803157 - objc attribute */
248 /* APPLE LOCAL begin radar 3803157 - objc attribute */
249 objc_start_method_definition (tree ARG_UNUSED (signature),
250 tree ARG_UNUSED (attribute))
251 /* APPLE LOCAL end radar 3803157 - objc attribute */
256 objc_finish_method_definition (tree ARG_UNUSED (fndecl))
261 objc_build_keyword_decl (tree ARG_UNUSED (selector),
262 tree ARG_UNUSED (typename),
263 /* APPLE LOCAL begin radar 4157812 */
264 tree ARG_UNUSED (identifier),
265 tree ARG_UNUSED (attribute))
266 /* APPLE LOCAL end radar 4157812 */
272 objc_build_method_signature (tree ARG_UNUSED (rettype),
273 tree ARG_UNUSED (selectors),
274 tree ARG_UNUSED (optparms),
275 bool ARG_UNUSED (ellipsis))
281 objc_build_encode_expr (tree ARG_UNUSED (expr))
287 objc_build_protocol_expr (tree ARG_UNUSED (expr))
293 objc_build_selector_expr (tree ARG_UNUSED (expr))
299 objc_build_message_expr (tree ARG_UNUSED (expr))
305 objc_build_string_object (tree ARG_UNUSED (str))
311 objc_get_class_reference (tree ARG_UNUSED (name))
316 /* APPLE LOCAL begin radar 4291785 */
318 objc_get_interface_ivars (tree ARG_UNUSED (fieldlist))
323 objc_detect_field_duplicates (tree ARG_UNUSED (fieldlist))
326 /* APPLE LOCAL end radar 4291785 */
329 objc_get_protocol_qualified_type (tree ARG_UNUSED (name),
330 tree ARG_UNUSED (protos))
336 objc_static_init_needed_p (void)
342 objc_generate_static_init_call (tree ARG_UNUSED (ctors))
348 objc_is_public (tree ARG_UNUSED (expr), tree ARG_UNUSED (identifier))
353 /* APPLE LOCAL begin C* language */
355 objc_set_method_opt (int ARG_UNUSED (opt))
360 objc_build_component_ref (tree ARG_UNUSED (datum), tree ARG_UNUSED (component))
366 objc_build_foreach_components (tree ARG_UNUSED (receiver),
367 tree *ARG_UNUSED (enumState_decl),
368 tree *ARG_UNUSED (items_decl),
369 tree *ARG_UNUSED (limit_decl),
370 tree *ARG_UNUSED (startMutations_decl),
371 tree *ARG_UNUSED (counter_decl),
372 tree *ARG_UNUSED (countByEnumeratingWithState))
376 /* APPLE LOCAL end C* language */
378 /* APPLE LOCAL begin C* property (Radar 4436866) */
380 objc_set_property_attr (int ARG_UNUSED (code), tree ARG_UNUSED (identifier))
384 objc_add_property_variable (tree ARG_UNUSED (prop))
387 /* APPLE LOCAL radar 5285911 */
388 /* Stub for objc_build_getter_call is removed. */
390 objc_build_setter_call (tree ARG_UNUSED (lhs), tree ARG_UNUSED (rhs))
394 /* APPLE LOCAL end C* property (Radar 4436866) */
397 objc_get_class_ivars (tree ARG_UNUSED (name))
403 objc_build_throw_stmt (tree ARG_UNUSED (expr))
409 objc_build_synchronized (location_t ARG_UNUSED (start_locus),
410 tree ARG_UNUSED (mutex), tree ARG_UNUSED (body))
416 objc_begin_try_stmt (location_t ARG_UNUSED (try_locus), tree ARG_UNUSED (body))
421 objc_begin_catch_clause (tree ARG_UNUSED (decl))
426 objc_finish_catch_clause (void)
431 objc_build_finally_clause (location_t ARG_UNUSED (finally_locus),
432 tree ARG_UNUSED (body))
437 objc_finish_try_stmt (void)
443 objc_generate_write_barrier (tree ARG_UNUSED (lhs),
444 enum tree_code ARG_UNUSED (modifycode),
445 tree ARG_UNUSED (rhs))
449 /* APPLE LOCAL begin radar 5276085 */
450 void objc_weak_reference_expr (tree* ARG_UNUSED (expr))
455 objc_build_weak_reference_tree (tree expr)
459 /* APPLE LOCAL end radar 5276085 */
461 /* APPLE LOCAL begin C* warnings to easy porting to new abi */
463 diagnose_selector_cast (tree ARG_UNUSED (cast_type), tree ARG_UNUSED (sel_exp))
466 /* APPLE LOCAL end C* warnings to easy porting to new abi */
468 /* APPLE LOCAL begin radar 4441049 */
470 objc_v2_component_ref_field_offset (tree ARG_UNUSED (exp))
476 objc_v2_bitfield_ivar_bitpos (tree ARG_UNUSED (exp))
480 /* APPLE LOCAL end radar 4441049 */
481 /* APPLE LOCAL begin radar 4507230 */
483 objc_type_valid_for_messaging (tree ARG_UNUSED (exp))
487 /* APPLE LOCAL end radar 4507230 */
488 /* APPLE LOCAL begin radar 3803157 - objc attribute */
490 objc_method_decl (enum tree_code ARG_UNUSED (opcode))
494 /* APPLE LOCAL end radar 3803157 - objc attribute */
496 /* APPLE LOCAL begin radar 4708210 (for_objc_collection in 4.2) */
498 objc_finish_foreach_loop (location_t ARG_UNUSED (location), tree ARG_UNUSED (cond),
499 tree ARG_UNUSED (for_body), tree ARG_UNUSED (blab),
500 tree ARG_UNUSED (clab))
504 /* APPLE LOCAL end radar 4708210 (for_objc_collection in 4.2) */
505 /* APPLE LOCAL begin radar 5847976 */
507 objc_is_gcable_type (tree ARG_UNUSED (type))
511 /* APPLE LOCAL end radar 5847976 */
512 /* APPLE LOCAL begin radar 4592503 */
514 objc_checkon_weak_attribute (tree ARG_UNUSED (decl))
518 /* APPLE LOCAL end radar 4592503 */
519 /* APPLE LOCAL begin radar 4712269 */
521 objc_build_incr_decr_setter_call (enum tree_code ARG_UNUSED (code),
522 tree ARG_UNUSED (lhs),
523 tree ARG_UNUSED (inc))
527 /* APPLE LOCAL end radar 4712269 */
528 /* APPLE LOCAL begin objc new property */
529 void objc_declare_property_impl (int ARG_UNUSED (code),
530 tree ARG_UNUSED (tree_list))
533 /* APPLE LOCAL begin radar 5285911 */
535 objc_build_property_reference_expr (tree ARG_UNUSED (datum),
536 tree ARG_UNUSED (component))
541 objc_property_reference_expr (tree ARG_UNUSED (exp))
545 /* APPLE LOCAL end radar 5285911 */
546 /* APPLE LOCAL end objc new property */
547 /* APPLE LOCAL begin radar 4985544 */
549 objc_check_format_nsstring (tree ARG_UNUSED (argument),
550 unsigned HOST_WIDE_INT ARG_UNUSED (format_num),
551 bool * ARG_UNUSED(no_add_attrs))
555 /* APPLE LOCAL end radar 4985544 */
556 /* APPLE LOCAL begin radar 5202926 */
558 objc_anonymous_local_objc_name (const char * ARG_UNUSED (name))
562 /* APPLE LOCAL begin radar 5195402 */
564 objc_check_nsstring_pointer_type (tree ARG_UNUSED (type))
568 /* APPLE LOCAL end radar 5195402 */
569 /* APPLE LOCAL end radar 5202926 */
571 /* APPLE LOCAL begin radar 5782740 - blocks */
572 bool block_requires_copying (tree exp)
574 /* APPLE LOCAL begin radar 6175959 */
575 tree type = TREE_TYPE (exp);
576 return TREE_CODE (type) == BLOCK_POINTER_TYPE
577 || (POINTER_TYPE_P (type)
578 && lookup_attribute ("NSObject", TYPE_ATTRIBUTES (type)));
579 /* APPLE LOCAL end radar 6175959 */
581 /* APPLE LOCAL end radar 5782740 - blocks */
583 /* APPLE LOCAL begin radar 5802025 */
584 tree objc_build_property_getter_func_call (tree object)
588 /* APPLE LOCAL end radar 5802025 */