xref: /netbsd-src/external/gpl3/gcc.old/dist/gcc/objc/objc-encoding.h (revision 8feb0f0b7eaff0608f8350bbfa3098827b4bb91b)
136ac495dSmrg /* Routines dealing with ObjC encoding of types
2*8feb0f0bSmrg    Copyright (C) 1992-2020 Free Software Foundation, Inc.
336ac495dSmrg 
436ac495dSmrg This file is part of GCC.
536ac495dSmrg 
636ac495dSmrg GCC is free software; you can redistribute it and/or modify
736ac495dSmrg it under the terms of the GNU General Public License as published by
836ac495dSmrg the Free Software Foundation; either version 3, or (at your option)
936ac495dSmrg any later version.
1036ac495dSmrg 
1136ac495dSmrg GCC is distributed in the hope that it will be useful,
1236ac495dSmrg but WITHOUT ANY WARRANTY; without even the implied warranty of
1336ac495dSmrg MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1436ac495dSmrg GNU General Public License for more details.
1536ac495dSmrg 
1636ac495dSmrg You should have received a copy of the GNU General Public License
1736ac495dSmrg along with GCC; see the file COPYING3.  If not see
1836ac495dSmrg <http://www.gnu.org/licenses/>.  */
1936ac495dSmrg 
2036ac495dSmrg #ifndef GCC_OBJC_ENCODING_H
2136ac495dSmrg #define GCC_OBJC_ENCODING_H
2236ac495dSmrg 
2336ac495dSmrg /* This is used to initialize the obstacks used by encoding.  It
2436ac495dSmrg    should be called before any encoding function is used.  It is
2536ac495dSmrg    usually done in objc_init().  */
2636ac495dSmrg extern void objc_encoding_init (void);
2736ac495dSmrg 
2836ac495dSmrg /* Encode a method prototype.  The format is described in
2936ac495dSmrg    gcc/doc/objc.texi, section 'Method signatures'.  */
3036ac495dSmrg extern tree encode_method_prototype (tree method_decl);
3136ac495dSmrg 
3236ac495dSmrg /* This is used to implement @encode().  See gcc/doc/objc.texi,
3336ac495dSmrg    section '@encode'.  */
3436ac495dSmrg extern tree objc_build_encode_expr (tree type);
3536ac495dSmrg 
3636ac495dSmrg /* (Decide if these can ever be validly changed.)  */
3736ac495dSmrg #define OBJC_ENCODE_INLINE_DEFS		0
3836ac495dSmrg #define OBJC_ENCODE_DONT_INLINE_DEFS	1
3936ac495dSmrg 
4036ac495dSmrg /* Encode the attributes of a property.  */
4136ac495dSmrg extern tree objc_v2_encode_prop_attr (tree property);
4236ac495dSmrg 
4336ac495dSmrg /* Encode the type of a field.  Return an identifier with the type
4436ac495dSmrg    encoding for the field.  The type encoding is a null-terminated
4536ac495dSmrg    string.  */
4636ac495dSmrg extern tree encode_field_decl (tree field_decl);
4736ac495dSmrg 
4836ac495dSmrg /* Tells "encode_pointer/encode_aggregate" whether we are generating
4936ac495dSmrg    type descriptors for instance variables (as opposed to methods).
5036ac495dSmrg    Type descriptors for instance variables contain more information
5136ac495dSmrg    than methods (for static typing and embedded structures).
5236ac495dSmrg 
5336ac495dSmrg    TODO: Replace this global variable with an argument that is passed
5436ac495dSmrg    to the various encode() functions.
5536ac495dSmrg 
5636ac495dSmrg    TODO: Change it to a 'bool'.  */
5736ac495dSmrg extern int generating_instance_variables;
5836ac495dSmrg 
5936ac495dSmrg #endif /* GCC_OBJC_ENCODING_H */
60