1 /* Encoding of types for Objective C.
2 Copyright (C) 1993, 1997 Free Software Foundation, Inc.
4 Author: Kresten Krab Thorup
6 This file is part of GNU CC.
8 GNU CC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
13 GNU CC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GNU CC; see the file COPYING. If not, write to
20 the Free Software Foundation, 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* As a special exception, if you link this library with files
24 compiled with GCC to produce an executable, this does not cause
25 the resulting executable to be covered by the GNU General Public License.
26 This exception does not however invalidate any other reasons why
27 the executable file might be covered by the GNU General Public License. */
29 #ifndef __encoding_INCLUDE_GNU
30 #define __encoding_INCLUDE_GNU
33 #include "objc/objc-api.h"
42 #define _C_GCINVISIBLE '!'
48 #define _F_BYCOPY 0x04
50 #define _F_ONEWAY 0x10
51 #define _F_GCINVISIBLE 0x20
53 int objc_aligned_size (const char* type
);
54 int objc_sizeof_type (const char* type
);
55 int objc_alignof_type (const char* type
);
56 int objc_aligned_size (const char* type
);
57 int objc_promoted_size (const char* type
);
59 const char* objc_skip_type_qualifiers (const char* type
);
60 const char* objc_skip_typespec (const char* type
);
61 const char* objc_skip_offset (const char* type
);
62 const char* objc_skip_argspec (const char* type
);
63 int method_get_number_of_arguments (struct objc_method
*);
64 int method_get_sizeof_arguments (struct objc_method
*);
66 char* method_get_first_argument (struct objc_method
*,
69 char* method_get_next_argument (arglist_t argframe
,
71 char* method_get_nth_argument (struct objc_method
* m
,
76 unsigned objc_get_type_qualifiers (const char* type
);
79 struct objc_struct_layout
81 const char *original_type
;
83 const char *prev_type
;
84 unsigned int record_size
;
85 unsigned int record_align
;
88 void objc_layout_structure (const char *type
,
89 struct objc_struct_layout
*layout
);
90 BOOL
objc_layout_structure_next_member (struct objc_struct_layout
*layout
);
91 void objc_layout_finish_structure (struct objc_struct_layout
*layout
,
94 void objc_layout_structure_get_info (struct objc_struct_layout
*layout
,
99 #endif /* __encoding_INCLUDE_GNU */