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