re PR middle-end/36753 (Forward propagation interacts badly with global register...
[official-gcc.git] / libobjc / objc / encoding.h
blobc432ee93bd3c337cf775528cc53a12436c3fa765
1 /* Encoding of types for Objective C.
2 Copyright (C) 1993, 1997, 2002, 2004 Free Software Foundation, Inc.
4 Author: Kresten Krab Thorup
6 This file is part of GCC.
8 GCC 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)
11 any later version.
13 GCC 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 GCC; see the file COPYING. If not, write to
20 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, 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
32 #include "objc-api.h"
33 #include <ctype.h>
35 #ifdef __cplusplus
36 extern "C" {
37 #endif /* __cplusplus */
39 #define _C_CONST 'r'
40 #define _C_IN 'n'
41 #define _C_INOUT 'N'
42 #define _C_OUT 'o'
43 #define _C_BYCOPY 'O'
44 #define _C_BYREF 'R'
45 #define _C_ONEWAY 'V'
46 #define _C_GCINVISIBLE '!'
48 #define _F_CONST 0x01
49 #define _F_IN 0x01
50 #define _F_OUT 0x02
51 #define _F_INOUT 0x03
52 #define _F_BYCOPY 0x04
53 #define _F_BYREF 0x08
54 #define _F_ONEWAY 0x10
55 #define _F_GCINVISIBLE 0x20
57 int objc_aligned_size (const char *type);
58 int objc_sizeof_type (const char *type);
59 int objc_alignof_type (const char *type);
60 int objc_aligned_size (const char *type);
61 int objc_promoted_size (const char *type);
63 const char *objc_skip_type_qualifiers (const char *type);
64 const char *objc_skip_typespec (const char *type);
65 const char *objc_skip_offset (const char *type);
66 const char *objc_skip_argspec (const char *type);
67 int method_get_number_of_arguments (struct objc_method *);
68 int method_get_sizeof_arguments (struct objc_method *);
70 char *method_get_first_argument (struct objc_method *,
71 arglist_t argframe,
72 const char **type);
73 char *method_get_next_argument (arglist_t argframe,
74 const char **type);
75 char *method_get_nth_argument (struct objc_method *m,
76 arglist_t argframe,
77 int arg,
78 const char **type);
80 unsigned objc_get_type_qualifiers (const char *type);
83 struct objc_struct_layout
85 const char *original_type;
86 const char *type;
87 const char *prev_type;
88 unsigned int record_size;
89 unsigned int record_align;
92 void objc_layout_structure (const char *type,
93 struct objc_struct_layout *layout);
94 BOOL objc_layout_structure_next_member (struct objc_struct_layout *layout);
95 void objc_layout_finish_structure (struct objc_struct_layout *layout,
96 unsigned int *size,
97 unsigned int *align);
98 void objc_layout_structure_get_info (struct objc_struct_layout *layout,
99 unsigned int *offset,
100 unsigned int *align,
101 const char **type);
103 #ifdef __cplusplus
105 #endif /* __cplusplus */
107 #endif /* __encoding_INCLUDE_GNU */