annotate gcc/objc/objc-encoding.h @ 111:04ced10e8804

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