aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.2.1-5666.3/gcc/stub-objc.c
blob: bc76079c071b01cf090efdeba107b767e1713551 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
/* Stub functions for Objective-C and Objective-C++ routines
   that are called from within the C and C++ front-ends,
   respectively.
   Copyright (C) 1991, 1995, 1997, 1998,
   1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING.  If not, write to the Free
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.  */

#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "c-common.h"

tree
objc_is_class_name (tree ARG_UNUSED (arg))
{
  return 0;
}

tree
objc_is_id (tree ARG_UNUSED (arg))
{
  return 0;
}

tree
objc_is_object_ptr (tree ARG_UNUSED (arg))
{
  return 0;
}

/* APPLE LOCAL begin radar 4133425 */
bool objc_diagnose_private_ivar (tree ARG_UNUSED (arg))
{
  return false;
}
/* APPLE LOCAL end radar 4133425 */

tree
objc_lookup_ivar (tree other, tree ARG_UNUSED (arg))
{
  /* Just use whatever C/C++ found.  */
  return other;
}

void
objc_check_decl (tree ARG_UNUSED (decl))
{
}

/* APPLE LOCAL begin radar 4281748 */
void
objc_check_global_decl (tree ARG_UNUSED (decl))
{
}
/* APPLE LOCAL end radar 4281748 */

/* APPLE LOCAL begin radar 4330422 */
tree
objc_non_volatilized_type (tree type)
{
  return type;
}
/* APPLE LOCAL end radar 4330422 */

/* APPLE LOCAL begin radar 4697411 */
void
objc_volatilize_component_ref (tree ARG_UNUSED (cref), tree ARG_UNUSED (type))
{
}
/* APPLE LOCAL end radar 4697411 */
   
int
objc_is_reserved_word (tree ARG_UNUSED (ident))
{
  return 0;
}

/* APPLE LOCAL begin 4154928 */
tree
objc_common_type (tree ARG_UNUSED (type1), tree ARG_UNUSED (type2))
{
  return false;
}
/* APPLE LOCAL end 4154928 */

bool
objc_compare_types (tree ARG_UNUSED (ltyp), tree ARG_UNUSED (rtyp),
		    /* APPLE LOCAL begin radar 6231433 */
		    int ARG_UNUSED (argno), tree ARG_UNUSED (callee),
		    const char * ARG_UNUSED (message))
		    /* APPLE LOCAL end radar 6231433 */
{
  return false;
}

/* APPLE LOCAL begin radar 4229905 - radar 6231433 */
bool
objc_have_common_type (tree ARG_UNUSED (ltyp), tree ARG_UNUSED (rtyp),
		       int ARG_UNUSED (argno), tree ARG_UNUSED (callee),
		       const char * ARG_UNUSED (message))
{
  return false;
}
/* APPLE LOCAL end radar 4229905 - radar 6231433 */

void
objc_volatilize_decl (tree ARG_UNUSED (decl))
{
}

bool
objc_type_quals_match (tree ARG_UNUSED (ltyp), tree ARG_UNUSED (rtyp))
{
  return false;
}

tree
objc_rewrite_function_call (tree function, tree ARG_UNUSED (params))
{
  return function;
}

tree
objc_message_selector (void)
{ 
  return 0;
}

void
objc_declare_alias (tree ARG_UNUSED (alias), tree ARG_UNUSED (orig))
{
}

void
objc_declare_class (tree ARG_UNUSED (list))
{
}

void
/* APPLE LOCAL begin radar 4947311 - protocol attributes */
objc_declare_protocols (tree ARG_UNUSED (list), tree ARG_UNUSED (attributes))
{
}

void
objc_start_protocol (tree ARG_UNUSED (proto),
		     tree ARG_UNUSED (protorefs),
		     tree ARG_UNUSED (attributes))
{
}
/* APPLE LOCAL end radar 4947311 - protocol attributes */

void
objc_start_class_interface (tree ARG_UNUSED (name),
			    tree ARG_UNUSED (super),
/* APPLE LOCAL begin radar 4548636 */
			    tree ARG_UNUSED (protos),
			    tree ARG_UNUSED (attributes))
/* APPLE LOCAL end radar 4548636 */
{
}

void
objc_start_category_interface (tree ARG_UNUSED (name),
			       tree ARG_UNUSED (categ),
			       tree ARG_UNUSED (protos))
{
}

void
objc_continue_interface (void)
{
}

void
objc_finish_interface (void)
{
}

void
objc_add_instance_variable (tree ARG_UNUSED (decl))
{
}

void
objc_set_visibility (int ARG_UNUSED (vis))
{
}

void
objc_set_method_type (enum tree_code ARG_UNUSED (code))
{
}

void
objc_start_class_implementation (tree ARG_UNUSED (name),
				 tree ARG_UNUSED (super))
{
}

void
objc_start_category_implementation (tree ARG_UNUSED (name),
				    tree ARG_UNUSED (categ))
{
}

void
objc_continue_implementation (void)
{
}

void
objc_clear_super_receiver (void)
{
}

void
objc_finish_implementation (void)
{
}

void
/* APPLE LOCAL begin radar 3803157 - objc attribute */
objc_add_method_declaration (tree ARG_UNUSED (signature),
			     tree ARG_UNUSED (attribute))
/* APPLE LOCAL end radar 3803157 - objc attribute */
{
}

void
/* APPLE LOCAL begin radar 3803157 - objc attribute */
objc_start_method_definition (tree ARG_UNUSED (signature),
			      tree ARG_UNUSED (attribute))
/* APPLE LOCAL end radar 3803157 - objc attribute */
{
}

void
objc_finish_method_definition (tree ARG_UNUSED (fndecl))
{
}

tree
objc_build_keyword_decl (tree ARG_UNUSED (selector),
			 tree ARG_UNUSED (typename),
			 /* APPLE LOCAL begin radar 4157812 */
			 tree ARG_UNUSED (identifier),
			 tree ARG_UNUSED (attribute))
			 /* APPLE LOCAL end radar 4157812 */
{
  return 0;
}

tree
objc_build_method_signature (tree ARG_UNUSED (rettype),
			     tree ARG_UNUSED (selectors),
			     tree ARG_UNUSED (optparms),
			     bool ARG_UNUSED (ellipsis))
{
  return 0;
}

tree
objc_build_encode_expr (tree ARG_UNUSED (expr))
{
  return 0;
}

tree
objc_build_protocol_expr (tree ARG_UNUSED (expr))
{
  return 0;
}

tree
objc_build_selector_expr (tree ARG_UNUSED (expr))
{
  return 0;
}

tree
objc_build_message_expr (tree ARG_UNUSED (expr))
{
  return 0;
}

tree
objc_build_string_object (tree ARG_UNUSED (str))
{
  return 0;
}

tree
objc_get_class_reference (tree ARG_UNUSED (name))
{
  return 0;
}

/* APPLE LOCAL begin radar 4291785 */
tree
objc_get_interface_ivars (tree ARG_UNUSED (fieldlist))
{
  return 0;
}
void
objc_detect_field_duplicates (tree ARG_UNUSED (fieldlist))
{
}
/* APPLE LOCAL end radar 4291785 */

tree
objc_get_protocol_qualified_type (tree ARG_UNUSED (name),
				  tree ARG_UNUSED (protos))
{
  return 0;
}

int
objc_static_init_needed_p (void)
{
  return 0;
}

tree
objc_generate_static_init_call (tree ARG_UNUSED (ctors))
{
  return 0;
}

int
objc_is_public (tree ARG_UNUSED (expr), tree ARG_UNUSED (identifier))
{
  return 1;
}

/* APPLE LOCAL begin C* language */
void
objc_set_method_opt (int ARG_UNUSED (opt))
{
}

tree
objc_build_component_ref (tree ARG_UNUSED (datum), tree ARG_UNUSED (component))
{
  return 0;
}

tree
objc_build_foreach_components (tree ARG_UNUSED (receiver),
			       tree *ARG_UNUSED (enumState_decl),
			       tree *ARG_UNUSED (items_decl),
			       tree *ARG_UNUSED (limit_decl),
			       tree *ARG_UNUSED (startMutations_decl),
			       tree *ARG_UNUSED (counter_decl),
			       tree *ARG_UNUSED (countByEnumeratingWithState))
{
  return 0;
}
/* APPLE LOCAL end C* language */

/* APPLE LOCAL begin C* property (Radar 4436866) */
void
objc_set_property_attr (int ARG_UNUSED (code), tree ARG_UNUSED (identifier))
{
}
void
objc_add_property_variable (tree ARG_UNUSED (prop))
{
}
/* APPLE LOCAL radar 5285911 */
/* Stub for objc_build_getter_call is removed. */
tree
objc_build_setter_call (tree ARG_UNUSED (lhs), tree ARG_UNUSED (rhs))
{
  return 0;
}
/* APPLE LOCAL end C* property (Radar 4436866) */

tree
objc_get_class_ivars (tree ARG_UNUSED (name))
{
  return 0;
}

tree
objc_build_throw_stmt (tree ARG_UNUSED (expr))
{
  return 0;
}

tree
objc_build_synchronized (location_t ARG_UNUSED (start_locus),
			 tree ARG_UNUSED (mutex), tree ARG_UNUSED (body))
{
  return 0;
}

void
objc_begin_try_stmt (location_t ARG_UNUSED (try_locus), tree ARG_UNUSED (body))
{
}
   
void
objc_begin_catch_clause (tree ARG_UNUSED (decl))
{
}

void
objc_finish_catch_clause (void)
{
}

void
objc_build_finally_clause (location_t ARG_UNUSED (finally_locus),
			   tree ARG_UNUSED (body))
{
}

tree
objc_finish_try_stmt (void)
{
  return 0;
}

tree
objc_generate_write_barrier (tree ARG_UNUSED (lhs),
			     enum tree_code ARG_UNUSED (modifycode),
			     tree ARG_UNUSED (rhs))
{
  return 0;
}  
/* APPLE LOCAL begin radar 5276085 */
void objc_weak_reference_expr (tree* ARG_UNUSED (expr))
{
}

tree
objc_build_weak_reference_tree (tree expr)
{
  return expr;
}
/* APPLE LOCAL end radar 5276085 */

/* APPLE LOCAL begin ObjC new abi */
tree
objc_v2_build_ivar_ref (tree ARG_UNUSED (datum), tree ARG_UNUSED (component))
{
  return 0;
}
/* APPLE LOCAL end ObjC new abi */

/* APPLE LOCAL begin C* warnings to easy porting to new abi */
void
diagnose_selector_cast (tree ARG_UNUSED (cast_type), tree ARG_UNUSED (sel_exp))
{
}
/* APPLE LOCAL end C* warnings to easy porting to new abi */

/* APPLE LOCAL begin radar 4441049 */
tree
objc_v2_component_ref_field_offset (tree ARG_UNUSED (exp))
{
  return 0;
}

tree
objc_v2_bitfield_ivar_bitpos (tree ARG_UNUSED (exp))
{
  return 0;
}
/* APPLE LOCAL end radar 4441049 */ 
/* APPLE LOCAL begin radar 4507230 */
bool 
objc_type_valid_for_messaging (tree ARG_UNUSED (exp))
{
  return false;
}
/* APPLE LOCAL end radar 4507230 */
/* APPLE LOCAL begin radar 3803157 - objc attribute */
bool 
objc_method_decl (enum tree_code ARG_UNUSED (opcode))
{
  return false;
}
/* APPLE LOCAL end radar 3803157 - objc attribute */

/* APPLE LOCAL begin radar 4708210 (for_objc_collection in 4.2) */
void
objc_finish_foreach_loop (location_t ARG_UNUSED (location), tree ARG_UNUSED (cond), 
			  tree ARG_UNUSED (for_body), tree ARG_UNUSED (blab), 
			  tree ARG_UNUSED (clab))
{
  return;
}
/* APPLE LOCAL end radar 4708210 (for_objc_collection in 4.2) */
/* APPLE LOCAL begin radar 5847976 */
int
objc_is_gcable_type (tree ARG_UNUSED (type))
{
  return 0;
}
/* APPLE LOCAL end radar 5847976 */
/* APPLE LOCAL begin radar 4592503 */
void
objc_checkon_weak_attribute (tree ARG_UNUSED (decl)) 
{
  return;
}
/* APPLE LOCAL end radar 4592503 */
/* APPLE LOCAL begin radar 4712269 */
tree
objc_build_incr_decr_setter_call (enum tree_code ARG_UNUSED (code), 
				       tree ARG_UNUSED (lhs), 
				       tree ARG_UNUSED (inc))
{
  return NULL_TREE;
}
/* APPLE LOCAL end radar 4712269 */
/* APPLE LOCAL begin objc new property */
void objc_declare_property_impl (int ARG_UNUSED (code), 
				 tree ARG_UNUSED (tree_list))
{
}
/* APPLE LOCAL begin radar 5285911 */
tree
objc_build_property_reference_expr (tree ARG_UNUSED (datum), 
				    tree ARG_UNUSED (component))
{
  return 0;
}
bool 
objc_property_reference_expr (tree ARG_UNUSED (exp))
{
  return false;
}
/* APPLE LOCAL end radar 5285911 */
/* APPLE LOCAL end objc new property */
/* APPLE LOCAL begin radar 2848255 */
bool
objc2_valid_objc_catch_type (tree ARG_UNUSED (type))
{
  return false;
}
tree
objc2_build_throw_call (tree ARG_UNUSED (exp))
{
  return NULL_TREE;
}
/* APPLE LOCAL end radar 2848255 */
/* APPLE LOCAL begin radar 4985544 */
bool
objc_check_format_nsstring (tree ARG_UNUSED (argument),
                            unsigned HOST_WIDE_INT ARG_UNUSED (format_num),
                            bool * ARG_UNUSED(no_add_attrs))
{
  return false;
}
/* APPLE LOCAL end radar 4985544 */
/* APPLE LOCAL begin radar 5202926 */
bool
objc_anonymous_local_objc_name (const char * ARG_UNUSED (name))
{
  return false;
}
/* APPLE LOCAL begin radar 5195402 */
bool
objc_check_nsstring_pointer_type (tree ARG_UNUSED (type))
{
  return false;
}
/* APPLE LOCAL end radar 5195402 */
/* APPLE LOCAL end radar 5202926 */

/* APPLE LOCAL begin radar 5782740 - blocks */
bool block_requires_copying (tree exp)
{
  /* APPLE LOCAL begin radar 6175959 */
  tree type = TREE_TYPE (exp);
  return TREE_CODE (type) == BLOCK_POINTER_TYPE
	 || (POINTER_TYPE_P (type) 
	     && lookup_attribute ("NSObject", TYPE_ATTRIBUTES (type)));
  /* APPLE LOCAL end radar 6175959 */
}
/* APPLE LOCAL end radar 5782740 - blocks */

/* APPLE LOCAL begin radar 5802025 */
tree objc_build_property_getter_func_call (tree object)
{
  return object;
}
/* APPLE LOCAL end radar 5802025 */