objc-runtime-shared-support.h revision 1.9
1/* Support routines shared by all runtimes. 2 Copyright (C) 2011-2020 Free Software Foundation, Inc. 3 Contributed by Iain Sandoe 4 5This file is part of GCC. 6 7GCC is free software; you can redistribute it and/or modify 8it under the terms of the GNU General Public License as published by 9the Free Software Foundation; either version 3, or (at your option) 10any later version. 11 12GCC is distributed in the hope that it will be useful, 13but WITHOUT ANY WARRANTY; without even the implied warranty of 14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15GNU General Public License for more details. 16 17You should have received a copy of the GNU General Public License 18along with GCC; see the file COPYING3. If not see 19<http://www.gnu.org/licenses/>. */ 20 21#ifndef _OBJC_RUNTIME_SHARED_SUPPORT_H_ 22#define _OBJC_RUNTIME_SHARED_SUPPORT_H_ 23 24/* Left in obj-act.c for now... */ 25 26extern tree objc_start_struct (tree); 27extern tree objc_finish_struct (tree, tree); 28extern tree add_field_decl (tree, const char *, tree **); 29extern tree build_sized_array_type (tree, int); 30 31extern tree lookup_interface (tree); 32extern tree objc_build_constructor (tree, vec<constructor_elt, va_gc> *); 33 34extern tree start_var_decl (tree, const char *); 35extern void finish_var_decl (tree, tree); 36 37extern tree my_build_string (int, const char *); 38extern tree my_build_string_pointer (int, const char *); 39extern tree add_objc_string (tree ident, string_section); 40extern tree get_objc_string_decl (tree, string_section); 41 42extern void add_class_reference (tree); 43 44#ifdef OBJCPLUS 45extern void objc_start_function (tree, tree, tree, tree); 46extern tree objc_get_parm_info (int, tree); 47#else 48extern void objc_start_function (tree, tree, tree, struct c_arg_info *); 49extern struct c_arg_info *objc_get_parm_info (int, tree); 50#endif 51extern void objc_push_parm (tree); 52 53extern tree build_function_type_for_method (tree, tree, int, bool); 54 55extern char *objc_build_property_setter_name (tree); 56 57/* Stuff that should be migrated to shared support (or some v1-only file). */ 58extern void build_super_template (void); 59 60extern tree objc_build_component_ref (tree, tree); 61 62extern tree build_descriptor_table_initializer (tree, tree); 63extern tree build_method_prototype_list_template (tree, int); 64extern tree build_protocol_initializer (tree, tree, tree, tree, tree); 65 66/* Moved or new routines in objc-runtime-shared-support.c */ 67 68extern tree build_selector (tree); 69extern tree build_method_template (void); 70extern tree build_method_prototype_template (void); 71extern tree build_method_list_template (tree, int); 72 73extern tree build_dispatch_table_initializer (tree, tree); 74extern void diagnose_missing_method (tree, location_t); 75extern void build_next_selector_translation_table (void); 76extern void generate_protocol_references (tree); 77extern void build_module_descriptor (long, tree); 78extern tree build_ivar_list_initializer (tree, tree); 79extern tree build_ivar_list_template (tree, int); 80extern tree build_ivar_template (void); 81 82extern void generate_strings (void); 83 84extern void dump_interface (FILE *, tree); 85extern FILE *gen_declaration_file; 86 87#endif /* _OBJC_RUNTIME_SHARED_SUPPORT_H_ */ 88