xref: /netbsd-src/external/gpl3/gcc.old/dist/gcc/c-family/stub-objc.c (revision cb63e24e8d6aae7ddac1859a9015f48b1d8bd90e)
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
32 objc_is_class_name (tree ARG_UNUSED (arg))
33 {
34   return 0;
35 }
36 
37 tree
38 objc_is_id (tree ARG_UNUSED (arg))
39 {
40   return 0;
41 }
42 
43 tree
44 objc_is_object_ptr (tree ARG_UNUSED (arg))
45 {
46   return 0;
47 }
48 
49 bool objc_diagnose_private_ivar (tree ARG_UNUSED (arg))
50 {
51   return false;
52 }
53 
54 tree
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
62 objc_check_decl (tree ARG_UNUSED (decl))
63 {
64 }
65 
66 void
67 objc_check_global_decl (tree ARG_UNUSED (decl))
68 {
69 }
70 
71 tree
72 objc_common_type (tree ARG_UNUSED (type1), tree ARG_UNUSED (type2))
73 {
74   return 0;
75 }
76 
77 bool
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
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
92 objc_volatilize_decl (tree ARG_UNUSED (decl))
93 {
94 }
95 
96 tree
97 objc_rewrite_function_call (tree function, tree ARG_UNUSED (first_param))
98 {
99   return function;
100 }
101 
102 tree
103 objc_message_selector (void)
104 {
105   return 0;
106 }
107 
108 void
109 objc_declare_alias (tree ARG_UNUSED (alias), tree ARG_UNUSED (orig))
110 {
111 }
112 
113 void
114 objc_declare_class (tree ARG_UNUSED (identifier))
115 {
116 }
117 
118 void
119 objc_declare_protocol (tree ARG_UNUSED (name), tree ARG_UNUSED (attributes))
120 {
121 }
122 
123 void
124 objc_start_protocol (tree ARG_UNUSED (proto),
125 		     tree ARG_UNUSED (protorefs),
126 		     tree ARG_UNUSED (attribs))
127 {
128 }
129 
130 void
131 objc_set_method_opt (bool ARG_UNUSED (optional))
132 {
133 }
134 
135 void
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
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
152 objc_continue_interface (void)
153 {
154 }
155 
156 void
157 objc_finish_interface (void)
158 {
159 }
160 
161 void
162 objc_add_instance_variable (tree ARG_UNUSED (decl))
163 {
164 }
165 
166 void
167 objc_set_visibility (objc_ivar_visibility_kind ARG_UNUSED (vis))
168 {
169 }
170 
171 void
172 objc_start_class_implementation (tree ARG_UNUSED (name),
173 				 tree ARG_UNUSED (super))
174 {
175 }
176 
177 void
178 objc_start_category_implementation (tree ARG_UNUSED (name),
179 				    tree ARG_UNUSED (categ))
180 {
181 }
182 
183 void
184 objc_continue_implementation (void)
185 {
186 }
187 
188 void
189 objc_clear_super_receiver (void)
190 {
191 }
192 
193 void
194 objc_finish_implementation (void)
195 {
196 }
197 
198 void
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
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
215 objc_finish_method_definition (tree ARG_UNUSED (fndecl))
216 {
217 }
218 
219 bool
220 objc_method_decl (enum tree_code ARG_UNUSED(opcode))
221 {
222   return false;
223 }
224 
225 tree
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
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
245 objc_build_encode_expr (tree ARG_UNUSED (expr))
246 {
247   return 0;
248 }
249 
250 tree
251 objc_build_protocol_expr (tree ARG_UNUSED (expr))
252 {
253   return 0;
254 }
255 
256 tree
257 objc_build_selector_expr (location_t ARG_UNUSED (loc), tree ARG_UNUSED (expr))
258 {
259   return 0;
260 }
261 
262 tree
263 objc_build_message_expr (tree ARG_UNUSED (receiver), tree ARG_UNUSED (args))
264 {
265   return 0;
266 }
267 
268 tree
269 objc_build_string_object (tree ARG_UNUSED (str))
270 {
271   return 0;
272 }
273 
274 tree
275 objc_get_class_reference (tree ARG_UNUSED (name))
276 {
277   return 0;
278 }
279 
280 bool
281 objc_detect_field_duplicates (bool ARG_UNUSED (check_superclasses_only))
282 {
283   return false;
284 }
285 
286 tree
287 objc_get_protocol_qualified_type (tree ARG_UNUSED (name),
288 				  tree ARG_UNUSED (protos))
289 {
290   return 0;
291 }
292 
293 int
294 objc_static_init_needed_p (void)
295 {
296   return 0;
297 }
298 
299 tree
300 objc_generate_static_init_call (tree ARG_UNUSED (ctors))
301 {
302   return 0;
303 }
304 
305 int
306 objc_is_public (tree ARG_UNUSED (expr), tree ARG_UNUSED (identifier))
307 {
308   return 1;
309 }
310 
311 tree
312 objc_get_class_ivars (tree ARG_UNUSED (name))
313 {
314   return 0;
315 }
316 
317 void
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
326 objc_is_property_ref (tree ARG_UNUSED (node))
327 {
328   return 0;
329 }
330 
331 bool
332 objc_non_constant_expr_p (tree)
333 {
334   return 0;
335 }
336 
337 tree
338 objc_maybe_build_component_ref (tree ARG_UNUSED (datum), tree ARG_UNUSED (component))
339 {
340   return 0;
341 }
342 
343 tree
344 objc_build_class_component_ref (tree ARG_UNUSED (datum), tree ARG_UNUSED (component))
345 {
346   return 0;
347 }
348 
349 tree
350 objc_maybe_build_modify_expr (tree ARG_UNUSED (lhs), tree ARG_UNUSED (rhs))
351 {
352   return 0;
353 }
354 
355 tree
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
365 objc_add_synthesize_declaration (location_t ARG_UNUSED (start_locus),
366 				 tree ARG_UNUSED (property_and_ivar_list))
367 {
368 }
369 
370 void
371 objc_add_dynamic_declaration (location_t ARG_UNUSED (start_locus),
372 			      tree ARG_UNUSED (property_list))
373 {
374 }
375 
376 const char *
377 objc_maybe_printable_name (tree ARG_UNUSED (decl),
378 			   int ARG_UNUSED (v))
379 {
380   return NULL;
381 }
382 
383 tree
384 objc_build_throw_stmt (location_t ARG_UNUSED (loc), tree ARG_UNUSED (expr))
385 {
386   return 0;
387 }
388 
389 tree
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
397 objc_begin_try_stmt (location_t ARG_UNUSED (try_locus), tree ARG_UNUSED (body))
398 {
399 }
400 
401 void
402 objc_begin_catch_clause (tree ARG_UNUSED (decl))
403 {
404 }
405 
406 void
407 objc_finish_catch_clause (void)
408 {
409 }
410 
411 void
412 objc_build_finally_clause (location_t ARG_UNUSED (finally_locus),
413 			   tree ARG_UNUSED (body))
414 {
415 }
416 
417 tree
418 objc_finish_try_stmt (void)
419 {
420   return 0;
421 }
422 
423 tree
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
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
440 objc_write_global_declarations (void)
441 {
442 }
443 
444 bool
445 objc_string_ref_type_p (tree ARG_UNUSED (strp))
446 {
447    return false;
448 }
449 
450 void
451 objc_check_format_arg (tree ARG_UNUSED (format_arg),
452 		       tree ARG_UNUSED (args_list))
453 {
454 }
455 
456 void
457 objc_finish_function (void)
458 {
459 }
460 
461 void
462 objc_maybe_warn_exceptions (location_t ARG_UNUSED (loc))
463 {
464 }
465 
466 enum objc_property_attribute_kind objc_prop_attr_kind_for_rid (enum rid)
467 {
468   return OBJC_PROPERTY_ATTR_UNKNOWN;
469 }
470