1 /* Stub functions for Objective-C and Objective-C++ routines
2 that are called from within the C and C++ front-ends,
3 respectively.
4 Copyright (C) 1991-2020 Free Software Foundation, Inc.
5
6 This file is part of GCC.
7
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
11 version.
12
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
16 for more details.
17
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/>. */
21
22 #include "config.h"
23 #include "system.h"
24 #include "coretypes.h"
25 #include "tree.h"
26 #include "vec.h"
27
28 #include "c-common.h" /* for enum rid. */
29 #include "c-objc.h"
30
31 tree
objc_is_class_name(tree ARG_UNUSED (arg))32 objc_is_class_name (tree ARG_UNUSED (arg))
33 {
34 return 0;
35 }
36
37 tree
objc_is_id(tree ARG_UNUSED (arg))38 objc_is_id (tree ARG_UNUSED (arg))
39 {
40 return 0;
41 }
42
43 tree
objc_is_object_ptr(tree ARG_UNUSED (arg))44 objc_is_object_ptr (tree ARG_UNUSED (arg))
45 {
46 return 0;
47 }
48
objc_diagnose_private_ivar(tree ARG_UNUSED (arg))49 bool objc_diagnose_private_ivar (tree ARG_UNUSED (arg))
50 {
51 return false;
52 }
53
54 tree
objc_lookup_ivar(tree other,tree ARG_UNUSED (arg))55 objc_lookup_ivar (tree other, tree ARG_UNUSED (arg))
56 {
57 /* Just use whatever C/C++ found. */
58 return other;
59 }
60
61 void
objc_check_decl(tree ARG_UNUSED (decl))62 objc_check_decl (tree ARG_UNUSED (decl))
63 {
64 }
65
66 void
objc_check_global_decl(tree ARG_UNUSED (decl))67 objc_check_global_decl (tree ARG_UNUSED (decl))
68 {
69 }
70
71 tree
objc_common_type(tree ARG_UNUSED (type1),tree ARG_UNUSED (type2))72 objc_common_type (tree ARG_UNUSED (type1), tree ARG_UNUSED (type2))
73 {
74 return 0;
75 }
76
77 bool
objc_compare_types(tree ARG_UNUSED (ltyp),tree ARG_UNUSED (rtyp),int ARG_UNUSED (argno),tree ARG_UNUSED (callee))78 objc_compare_types (tree ARG_UNUSED (ltyp), tree ARG_UNUSED (rtyp),
79 int ARG_UNUSED (argno), tree ARG_UNUSED (callee))
80 {
81 return false;
82 }
83
84 bool
objc_have_common_type(tree ARG_UNUSED (ltyp),tree ARG_UNUSED (rtyp),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))
87 {
88 return false;
89 }
90
91 void
objc_volatilize_decl(tree ARG_UNUSED (decl))92 objc_volatilize_decl (tree ARG_UNUSED (decl))
93 {
94 }
95
96 tree
objc_rewrite_function_call(tree function,tree ARG_UNUSED (first_param))97 objc_rewrite_function_call (tree function, tree ARG_UNUSED (first_param))
98 {
99 return function;
100 }
101
102 tree
objc_message_selector(void)103 objc_message_selector (void)
104 {
105 return 0;
106 }
107
108 void
objc_declare_alias(tree ARG_UNUSED (alias),tree ARG_UNUSED (orig))109 objc_declare_alias (tree ARG_UNUSED (alias), tree ARG_UNUSED (orig))
110 {
111 }
112
113 void
objc_declare_class(tree ARG_UNUSED (identifier))114 objc_declare_class (tree ARG_UNUSED (identifier))
115 {
116 }
117
118 void
objc_declare_protocol(tree ARG_UNUSED (name),tree ARG_UNUSED (attributes))119 objc_declare_protocol (tree ARG_UNUSED (name), tree ARG_UNUSED (attributes))
120 {
121 }
122
123 void
objc_start_protocol(tree ARG_UNUSED (proto),tree ARG_UNUSED (protorefs),tree ARG_UNUSED (attribs))124 objc_start_protocol (tree ARG_UNUSED (proto),
125 tree ARG_UNUSED (protorefs),
126 tree ARG_UNUSED (attribs))
127 {
128 }
129
130 void
objc_set_method_opt(bool ARG_UNUSED (optional))131 objc_set_method_opt (bool ARG_UNUSED (optional))
132 {
133 }
134
135 void
objc_start_class_interface(tree ARG_UNUSED (name),tree ARG_UNUSED (super),tree ARG_UNUSED (protos),tree ARG_UNUSED (attribs))136 objc_start_class_interface (tree ARG_UNUSED (name),
137 tree ARG_UNUSED (super),
138 tree ARG_UNUSED (protos),
139 tree ARG_UNUSED (attribs))
140 {
141 }
142
143 void
objc_start_category_interface(tree ARG_UNUSED (name),tree ARG_UNUSED (categ),tree ARG_UNUSED (protos),tree ARG_UNUSED (attribs))144 objc_start_category_interface (tree ARG_UNUSED (name),
145 tree ARG_UNUSED (categ),
146 tree ARG_UNUSED (protos),
147 tree ARG_UNUSED (attribs))
148 {
149 }
150
151 void
objc_continue_interface(void)152 objc_continue_interface (void)
153 {
154 }
155
156 void
objc_finish_interface(void)157 objc_finish_interface (void)
158 {
159 }
160
161 void
objc_add_instance_variable(tree ARG_UNUSED (decl))162 objc_add_instance_variable (tree ARG_UNUSED (decl))
163 {
164 }
165
166 void
objc_set_visibility(objc_ivar_visibility_kind ARG_UNUSED (vis))167 objc_set_visibility (objc_ivar_visibility_kind ARG_UNUSED (vis))
168 {
169 }
170
171 void
objc_start_class_implementation(tree ARG_UNUSED (name),tree ARG_UNUSED (super))172 objc_start_class_implementation (tree ARG_UNUSED (name),
173 tree ARG_UNUSED (super))
174 {
175 }
176
177 void
objc_start_category_implementation(tree ARG_UNUSED (name),tree ARG_UNUSED (categ))178 objc_start_category_implementation (tree ARG_UNUSED (name),
179 tree ARG_UNUSED (categ))
180 {
181 }
182
183 void
objc_continue_implementation(void)184 objc_continue_implementation (void)
185 {
186 }
187
188 void
objc_clear_super_receiver(void)189 objc_clear_super_receiver (void)
190 {
191 }
192
193 void
objc_finish_implementation(void)194 objc_finish_implementation (void)
195 {
196 }
197
198 void
objc_add_method_declaration(bool ARG_UNUSED (is_class_method),tree ARG_UNUSED (signature),tree ARG_UNUSED (attributes))199 objc_add_method_declaration (bool ARG_UNUSED (is_class_method),
200 tree ARG_UNUSED (signature),
201 tree ARG_UNUSED (attributes))
202 {
203 }
204
205 bool
objc_start_method_definition(bool ARG_UNUSED (is_class_method),tree ARG_UNUSED (signature),tree ARG_UNUSED (attributes),tree ARG_UNUSED (expr))206 objc_start_method_definition (bool ARG_UNUSED (is_class_method),
207 tree ARG_UNUSED (signature),
208 tree ARG_UNUSED (attributes),
209 tree ARG_UNUSED (expr))
210 {
211 return true;
212 }
213
214 void
objc_finish_method_definition(tree ARG_UNUSED (fndecl))215 objc_finish_method_definition (tree ARG_UNUSED (fndecl))
216 {
217 }
218
219 bool
objc_method_decl(enum tree_code ARG_UNUSED (opcode))220 objc_method_decl (enum tree_code ARG_UNUSED(opcode))
221 {
222 return false;
223 }
224
225 tree
objc_build_keyword_decl(tree ARG_UNUSED (selector),tree ARG_UNUSED (type),tree ARG_UNUSED (identifier),tree ARG_UNUSED (attributes))226 objc_build_keyword_decl (tree ARG_UNUSED (selector),
227 tree ARG_UNUSED (type),
228 tree ARG_UNUSED (identifier),
229 tree ARG_UNUSED (attributes))
230 {
231 return 0;
232 }
233
234 tree
objc_build_method_signature(bool ARG_UNUSED (is_class_method),tree ARG_UNUSED (rettype),tree ARG_UNUSED (selectors),tree ARG_UNUSED (optparms),bool ARG_UNUSED (ellipsis))235 objc_build_method_signature (bool ARG_UNUSED (is_class_method),
236 tree ARG_UNUSED (rettype),
237 tree ARG_UNUSED (selectors),
238 tree ARG_UNUSED (optparms),
239 bool ARG_UNUSED (ellipsis))
240 {
241 return 0;
242 }
243
244 tree
objc_build_encode_expr(tree ARG_UNUSED (expr))245 objc_build_encode_expr (tree ARG_UNUSED (expr))
246 {
247 return 0;
248 }
249
250 tree
objc_build_protocol_expr(tree ARG_UNUSED (expr))251 objc_build_protocol_expr (tree ARG_UNUSED (expr))
252 {
253 return 0;
254 }
255
256 tree
objc_build_selector_expr(location_t ARG_UNUSED (loc),tree ARG_UNUSED (expr))257 objc_build_selector_expr (location_t ARG_UNUSED (loc), tree ARG_UNUSED (expr))
258 {
259 return 0;
260 }
261
262 tree
objc_build_message_expr(tree ARG_UNUSED (receiver),tree ARG_UNUSED (args))263 objc_build_message_expr (tree ARG_UNUSED (receiver), tree ARG_UNUSED (args))
264 {
265 return 0;
266 }
267
268 tree
objc_build_string_object(tree ARG_UNUSED (str))269 objc_build_string_object (tree ARG_UNUSED (str))
270 {
271 return 0;
272 }
273
274 tree
objc_get_class_reference(tree ARG_UNUSED (name))275 objc_get_class_reference (tree ARG_UNUSED (name))
276 {
277 return 0;
278 }
279
280 bool
objc_detect_field_duplicates(bool ARG_UNUSED (check_superclasses_only))281 objc_detect_field_duplicates (bool ARG_UNUSED (check_superclasses_only))
282 {
283 return false;
284 }
285
286 tree
objc_get_protocol_qualified_type(tree ARG_UNUSED (name),tree ARG_UNUSED (protos))287 objc_get_protocol_qualified_type (tree ARG_UNUSED (name),
288 tree ARG_UNUSED (protos))
289 {
290 return 0;
291 }
292
293 int
objc_static_init_needed_p(void)294 objc_static_init_needed_p (void)
295 {
296 return 0;
297 }
298
299 tree
objc_generate_static_init_call(tree ARG_UNUSED (ctors))300 objc_generate_static_init_call (tree ARG_UNUSED (ctors))
301 {
302 return 0;
303 }
304
305 int
objc_is_public(tree ARG_UNUSED (expr),tree ARG_UNUSED (identifier))306 objc_is_public (tree ARG_UNUSED (expr), tree ARG_UNUSED (identifier))
307 {
308 return 1;
309 }
310
311 tree
objc_get_class_ivars(tree ARG_UNUSED (name))312 objc_get_class_ivars (tree ARG_UNUSED (name))
313 {
314 return 0;
315 }
316
317 void
objc_add_property_declaration(location_t ARG_UNUSED (location),tree ARG_UNUSED (decl),vec<property_attribute_info * > &)318 objc_add_property_declaration (location_t ARG_UNUSED (location),
319 tree ARG_UNUSED (decl),
320 vec<property_attribute_info *>&
321 /*prop_attr_list*/)
322 {
323 }
324
325 bool
objc_is_property_ref(tree ARG_UNUSED (node))326 objc_is_property_ref (tree ARG_UNUSED (node))
327 {
328 return 0;
329 }
330
331 bool
objc_non_constant_expr_p(tree)332 objc_non_constant_expr_p (tree)
333 {
334 return 0;
335 }
336
337 tree
objc_maybe_build_component_ref(tree ARG_UNUSED (datum),tree ARG_UNUSED (component))338 objc_maybe_build_component_ref (tree ARG_UNUSED (datum), tree ARG_UNUSED (component))
339 {
340 return 0;
341 }
342
343 tree
objc_build_class_component_ref(tree ARG_UNUSED (datum),tree ARG_UNUSED (component))344 objc_build_class_component_ref (tree ARG_UNUSED (datum), tree ARG_UNUSED (component))
345 {
346 return 0;
347 }
348
349 tree
objc_maybe_build_modify_expr(tree ARG_UNUSED (lhs),tree ARG_UNUSED (rhs))350 objc_maybe_build_modify_expr (tree ARG_UNUSED (lhs), tree ARG_UNUSED (rhs))
351 {
352 return 0;
353 }
354
355 tree
objc_build_incr_expr_for_property_ref(location_t ARG_UNUSED (location),enum tree_code ARG_UNUSED (code),tree ARG_UNUSED (argument),tree ARG_UNUSED (increment))356 objc_build_incr_expr_for_property_ref (location_t ARG_UNUSED (location),
357 enum tree_code ARG_UNUSED (code),
358 tree ARG_UNUSED (argument),
359 tree ARG_UNUSED (increment))
360 {
361 return 0;
362 }
363
364 void
objc_add_synthesize_declaration(location_t ARG_UNUSED (start_locus),tree ARG_UNUSED (property_and_ivar_list))365 objc_add_synthesize_declaration (location_t ARG_UNUSED (start_locus),
366 tree ARG_UNUSED (property_and_ivar_list))
367 {
368 }
369
370 void
objc_add_dynamic_declaration(location_t ARG_UNUSED (start_locus),tree ARG_UNUSED (property_list))371 objc_add_dynamic_declaration (location_t ARG_UNUSED (start_locus),
372 tree ARG_UNUSED (property_list))
373 {
374 }
375
376 const char *
objc_maybe_printable_name(tree ARG_UNUSED (decl),int ARG_UNUSED (v))377 objc_maybe_printable_name (tree ARG_UNUSED (decl),
378 int ARG_UNUSED (v))
379 {
380 return NULL;
381 }
382
383 tree
objc_build_throw_stmt(location_t ARG_UNUSED (loc),tree ARG_UNUSED (expr))384 objc_build_throw_stmt (location_t ARG_UNUSED (loc), tree ARG_UNUSED (expr))
385 {
386 return 0;
387 }
388
389 tree
objc_build_synchronized(location_t ARG_UNUSED (start_locus),tree ARG_UNUSED (mutex),tree ARG_UNUSED (body))390 objc_build_synchronized (location_t ARG_UNUSED (start_locus),
391 tree ARG_UNUSED (mutex), tree ARG_UNUSED (body))
392 {
393 return 0;
394 }
395
396 void
objc_begin_try_stmt(location_t ARG_UNUSED (try_locus),tree ARG_UNUSED (body))397 objc_begin_try_stmt (location_t ARG_UNUSED (try_locus), tree ARG_UNUSED (body))
398 {
399 }
400
401 void
objc_begin_catch_clause(tree ARG_UNUSED (decl))402 objc_begin_catch_clause (tree ARG_UNUSED (decl))
403 {
404 }
405
406 void
objc_finish_catch_clause(void)407 objc_finish_catch_clause (void)
408 {
409 }
410
411 void
objc_build_finally_clause(location_t ARG_UNUSED (finally_locus),tree ARG_UNUSED (body))412 objc_build_finally_clause (location_t ARG_UNUSED (finally_locus),
413 tree ARG_UNUSED (body))
414 {
415 }
416
417 tree
objc_finish_try_stmt(void)418 objc_finish_try_stmt (void)
419 {
420 return 0;
421 }
422
423 tree
objc_generate_write_barrier(tree ARG_UNUSED (lhs),enum tree_code ARG_UNUSED (modifycode),tree ARG_UNUSED (rhs))424 objc_generate_write_barrier (tree ARG_UNUSED (lhs),
425 enum tree_code ARG_UNUSED (modifycode),
426 tree ARG_UNUSED (rhs))
427 {
428 return 0;
429 }
430
431 void
objc_finish_foreach_loop(location_t ARG_UNUSED (location),tree ARG_UNUSED (object_expression),tree ARG_UNUSED (collection_expression),tree ARG_UNUSED (for_body),tree ARG_UNUSED (break_label),tree ARG_UNUSED (continue_label))432 objc_finish_foreach_loop (location_t ARG_UNUSED (location), tree ARG_UNUSED (object_expression),
433 tree ARG_UNUSED (collection_expression), tree ARG_UNUSED (for_body),
434 tree ARG_UNUSED (break_label), tree ARG_UNUSED (continue_label))
435 {
436 return;
437 }
438
439 void
objc_write_global_declarations(void)440 objc_write_global_declarations (void)
441 {
442 }
443
444 bool
objc_string_ref_type_p(tree ARG_UNUSED (strp))445 objc_string_ref_type_p (tree ARG_UNUSED (strp))
446 {
447 return false;
448 }
449
450 void
objc_check_format_arg(tree ARG_UNUSED (format_arg),tree ARG_UNUSED (args_list))451 objc_check_format_arg (tree ARG_UNUSED (format_arg),
452 tree ARG_UNUSED (args_list))
453 {
454 }
455
456 void
objc_finish_function(void)457 objc_finish_function (void)
458 {
459 }
460
461 void
objc_maybe_warn_exceptions(location_t ARG_UNUSED (loc))462 objc_maybe_warn_exceptions (location_t ARG_UNUSED (loc))
463 {
464 }
465
objc_prop_attr_kind_for_rid(enum rid)466 enum objc_property_attribute_kind objc_prop_attr_kind_for_rid (enum rid)
467 {
468 return OBJC_PROPERTY_ATTR_UNKNOWN;
469 }
470