1 | /* Routines dealing with ObjC encoding of types |
2 | Copyright (C) 1992-2023 Free Software Foundation, Inc. |
3 | |
4 | This file is part of GCC. |
5 | |
6 | GCC is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; either version 3, or (at your option) |
9 | any later version. |
10 | |
11 | GCC is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. |
15 | |
16 | You should have received a copy of the GNU General Public License |
17 | along with GCC; see the file COPYING3. If not see |
18 | <http://www.gnu.org/licenses/>. */ |
19 | |
20 | #ifndef GCC_OBJC_ENCODING_H |
21 | #define GCC_OBJC_ENCODING_H |
22 | |
23 | /* This is used to initialize the obstacks used by encoding. It |
24 | should be called before any encoding function is used. It is |
25 | usually done in objc_init(). */ |
26 | extern void objc_encoding_init (void); |
27 | |
28 | /* Encode a method prototype. The format is described in |
29 | gcc/doc/objc.texi, section 'Method signatures'. */ |
30 | extern tree encode_method_prototype (tree method_decl); |
31 | |
32 | /* This is used to implement @encode(). See gcc/doc/objc.texi, |
33 | section '@encode'. */ |
34 | extern tree objc_build_encode_expr (tree type); |
35 | |
36 | /* (Decide if these can ever be validly changed.) */ |
37 | #define OBJC_ENCODE_INLINE_DEFS 0 |
38 | #define OBJC_ENCODE_DONT_INLINE_DEFS 1 |
39 | |
40 | /* Encode the attributes of a property. */ |
41 | extern tree objc_v2_encode_prop_attr (tree property); |
42 | |
43 | /* Encode the type of a field. Return an identifier with the type |
44 | encoding for the field. The type encoding is a null-terminated |
45 | string. */ |
46 | extern tree encode_field_decl (tree field_decl); |
47 | |
48 | /* Tells "encode_pointer/encode_aggregate" whether we are generating |
49 | type descriptors for instance variables (as opposed to methods). |
50 | Type descriptors for instance variables contain more information |
51 | than methods (for static typing and embedded structures). |
52 | |
53 | TODO: Replace this global variable with an argument that is passed |
54 | to the various encode() functions. |
55 | |
56 | TODO: Change it to a 'bool'. */ |
57 | extern int generating_instance_variables; |
58 | |
59 | #endif /* GCC_OBJC_ENCODING_H */ |
60 | |