]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/objc/objc-encoding.h
Update copyright years.
[thirdparty/gcc.git] / gcc / objc / objc-encoding.h
CommitLineData
f027ee7c 1/* Routines dealing with ObjC encoding of types
8d9254fc 2 Copyright (C) 1992-2020 Free Software Foundation, Inc.
f027ee7c
NP
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 3, or (at your option)
9any later version.
10
11GCC is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along 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
a8f18c40 23/* This is used to initialize the obstacks used by encoding. It
f027ee7c
NP
24 should be called before any encoding function is used. It is
25 usually done in objc_init(). */
a8f18c40 26extern void objc_encoding_init (void);
f027ee7c
NP
27
28/* Encode a method prototype. The format is described in
29 gcc/doc/objc.texi, section 'Method signatures'. */
30extern tree encode_method_prototype (tree method_decl);
31
32/* This is used to implement @encode(). See gcc/doc/objc.texi,
33 section '@encode'. */
34extern 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. */
41extern tree objc_v2_encode_prop_attr (tree property);
42
a8f18c40
NP
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. */
46extern tree encode_field_decl (tree field_decl);
f027ee7c
NP
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'. */
57extern int generating_instance_variables;
58
59#endif /* GCC_OBJC_ENCODING_H */