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