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