annotate include/gcc-c-fe.def @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Interface between GCC C FE and GDB -*- c -*-
kono
parents:
diff changeset
2
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
3 Copyright (C) 2014-2020 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 This file is part of GCC.
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 This program is free software; you can redistribute it and/or modify
kono
parents:
diff changeset
8 it under the terms of the GNU General Public License as published by
kono
parents:
diff changeset
9 the Free Software Foundation; either version 3 of the License, or
kono
parents:
diff changeset
10 (at your option) any later version.
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 This program is distributed in the hope that it will be useful,
kono
parents:
diff changeset
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
kono
parents:
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
kono
parents:
diff changeset
15 GNU General Public License for more details.
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 /* Create a new "decl" in GCC. A decl is a declaration, basically a
kono
parents:
diff changeset
23 kind of symbol.
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 NAME is the name of the new symbol. SYM_KIND is the kind of
kono
parents:
diff changeset
26 symbol being requested. SYM_TYPE is the new symbol's C type;
kono
parents:
diff changeset
27 except for labels, where this is not meaningful and should be
kono
parents:
diff changeset
28 zero. If SUBSTITUTION_NAME is not NULL, then a reference to this
kono
parents:
diff changeset
29 decl in the source will later be substituted with a dereference
kono
parents:
diff changeset
30 of a variable of the given name. Otherwise, for symbols having
kono
parents:
diff changeset
31 an address (e.g., functions), ADDRESS is the address. FILENAME
kono
parents:
diff changeset
32 and LINE_NUMBER refer to the symbol's source location. If this
kono
parents:
diff changeset
33 is not known, FILENAME can be NULL and LINE_NUMBER can be 0.
kono
parents:
diff changeset
34 This function returns the new decl. */
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 GCC_METHOD7 (gcc_decl, build_decl,
kono
parents:
diff changeset
37 const char *, /* Argument NAME. */
kono
parents:
diff changeset
38 enum gcc_c_symbol_kind, /* Argument SYM_KIND. */
kono
parents:
diff changeset
39 gcc_type, /* Argument SYM_TYPE. */
kono
parents:
diff changeset
40 const char *, /* Argument SUBSTITUTION_NAME. */
kono
parents:
diff changeset
41 gcc_address, /* Argument ADDRESS. */
kono
parents:
diff changeset
42 const char *, /* Argument FILENAME. */
kono
parents:
diff changeset
43 unsigned int) /* Argument LINE_NUMBER. */
kono
parents:
diff changeset
44
kono
parents:
diff changeset
45 /* Insert a GCC decl into the symbol table. DECL is the decl to
kono
parents:
diff changeset
46 insert. IS_GLOBAL is true if this is an outermost binding, and
kono
parents:
diff changeset
47 false if it is a possibly-shadowing binding. */
kono
parents:
diff changeset
48
kono
parents:
diff changeset
49 GCC_METHOD2 (int /* bool */, bind,
kono
parents:
diff changeset
50 gcc_decl, /* Argument DECL. */
kono
parents:
diff changeset
51 int /* bool */) /* Argument IS_GLOBAL. */
kono
parents:
diff changeset
52
kono
parents:
diff changeset
53 /* Insert a tagged type into the symbol table. NAME is the tag name
kono
parents:
diff changeset
54 of the type and TAGGED_TYPE is the type itself. TAGGED_TYPE must
kono
parents:
diff changeset
55 be either a struct, union, or enum type, as these are the only
kono
parents:
diff changeset
56 types that have tags. FILENAME and LINE_NUMBER refer to the type's
kono
parents:
diff changeset
57 source location. If this is not known, FILENAME can be NULL and
kono
parents:
diff changeset
58 LINE_NUMBER can be 0. */
kono
parents:
diff changeset
59
kono
parents:
diff changeset
60 GCC_METHOD4 (int /* bool */, tagbind,
kono
parents:
diff changeset
61 const char *, /* Argument NAME. */
kono
parents:
diff changeset
62 gcc_type, /* Argument TAGGED_TYPE. */
kono
parents:
diff changeset
63 const char *, /* Argument FILENAME. */
kono
parents:
diff changeset
64 unsigned int) /* Argument LINE_NUMBER. */
kono
parents:
diff changeset
65
kono
parents:
diff changeset
66 /* Return the type of a pointer to a given base type. */
kono
parents:
diff changeset
67
kono
parents:
diff changeset
68 GCC_METHOD1 (gcc_type, build_pointer_type,
kono
parents:
diff changeset
69 gcc_type) /* Argument BASE_TYPE. */
kono
parents:
diff changeset
70
kono
parents:
diff changeset
71 /* Create a new 'struct' type. Initially it has no fields. */
kono
parents:
diff changeset
72
kono
parents:
diff changeset
73 GCC_METHOD0 (gcc_type, build_record_type)
kono
parents:
diff changeset
74
kono
parents:
diff changeset
75 /* Create a new 'union' type. Initially it has no fields. */
kono
parents:
diff changeset
76
kono
parents:
diff changeset
77 GCC_METHOD0 (gcc_type, build_union_type)
kono
parents:
diff changeset
78
kono
parents:
diff changeset
79 /* Add a field to a struct or union type. FIELD_NAME is the field's
kono
parents:
diff changeset
80 name. FIELD_TYPE is the type of the field. BITSIZE and BITPOS
kono
parents:
diff changeset
81 indicate where in the struct the field occurs. */
kono
parents:
diff changeset
82
kono
parents:
diff changeset
83 GCC_METHOD5 (int /* bool */, build_add_field,
kono
parents:
diff changeset
84 gcc_type, /* Argument RECORD_OR_UNION_TYPE. */
kono
parents:
diff changeset
85 const char *, /* Argument FIELD_NAME. */
kono
parents:
diff changeset
86 gcc_type, /* Argument FIELD_TYPE. */
kono
parents:
diff changeset
87 unsigned long, /* Argument BITSIZE. */
kono
parents:
diff changeset
88 unsigned long) /* Argument BITPOS. */
kono
parents:
diff changeset
89
kono
parents:
diff changeset
90 /* After all the fields have been added to a struct or union, the
kono
parents:
diff changeset
91 struct or union type must be "finished". This does some final
kono
parents:
diff changeset
92 cleanups in GCC. */
kono
parents:
diff changeset
93
kono
parents:
diff changeset
94 GCC_METHOD2 (int /* bool */, finish_record_or_union,
kono
parents:
diff changeset
95 gcc_type, /* Argument RECORD_OR_UNION_TYPE. */
kono
parents:
diff changeset
96 unsigned long) /* Argument SIZE_IN_BYTES. */
kono
parents:
diff changeset
97
kono
parents:
diff changeset
98 /* Create a new 'enum' type. The new type initially has no
kono
parents:
diff changeset
99 associated constants. */
kono
parents:
diff changeset
100
kono
parents:
diff changeset
101 GCC_METHOD1 (gcc_type, build_enum_type,
kono
parents:
diff changeset
102 gcc_type) /* Argument UNDERLYING_INT_TYPE. */
kono
parents:
diff changeset
103
kono
parents:
diff changeset
104 /* Add a new constant to an enum type. NAME is the constant's
kono
parents:
diff changeset
105 name and VALUE is its value. */
kono
parents:
diff changeset
106
kono
parents:
diff changeset
107 GCC_METHOD3 (int /* bool */, build_add_enum_constant,
kono
parents:
diff changeset
108 gcc_type, /* Argument ENUM_TYPE. */
kono
parents:
diff changeset
109 const char *, /* Argument NAME. */
kono
parents:
diff changeset
110 unsigned long) /* Argument VALUE. */
kono
parents:
diff changeset
111
kono
parents:
diff changeset
112 /* After all the constants have been added to an enum, the type must
kono
parents:
diff changeset
113 be "finished". This does some final cleanups in GCC. */
kono
parents:
diff changeset
114
kono
parents:
diff changeset
115 GCC_METHOD1 (int /* bool */, finish_enum_type,
kono
parents:
diff changeset
116 gcc_type) /* Argument ENUM_TYPE. */
kono
parents:
diff changeset
117
kono
parents:
diff changeset
118 /* Create a new function type. RETURN_TYPE is the type returned by
kono
parents:
diff changeset
119 the function, and ARGUMENT_TYPES is a vector, of length NARGS, of
kono
parents:
diff changeset
120 the argument types. IS_VARARGS is true if the function is
kono
parents:
diff changeset
121 varargs. */
kono
parents:
diff changeset
122
kono
parents:
diff changeset
123 GCC_METHOD3 (gcc_type, build_function_type,
kono
parents:
diff changeset
124 gcc_type, /* Argument RETURN_TYPE. */
kono
parents:
diff changeset
125 const struct gcc_type_array *, /* Argument ARGUMENT_TYPES. */
kono
parents:
diff changeset
126 int /* bool */) /* Argument IS_VARARGS. */
kono
parents:
diff changeset
127
kono
parents:
diff changeset
128 /* Return an integer type with the given properties.
kono
parents:
diff changeset
129 Deprecated in v1, use int_type instead. */
kono
parents:
diff changeset
130
kono
parents:
diff changeset
131 GCC_METHOD2 (gcc_type, int_type_v0,
kono
parents:
diff changeset
132 int /* bool */, /* Argument IS_UNSIGNED. */
kono
parents:
diff changeset
133 unsigned long) /* Argument SIZE_IN_BYTES. */
kono
parents:
diff changeset
134
kono
parents:
diff changeset
135 /* Return a floating point type with the given properties.
kono
parents:
diff changeset
136 Deprecated in v1, use float_type instead. */
kono
parents:
diff changeset
137
kono
parents:
diff changeset
138 GCC_METHOD1 (gcc_type, float_type_v0,
kono
parents:
diff changeset
139 unsigned long) /* Argument SIZE_IN_BYTES. */
kono
parents:
diff changeset
140
kono
parents:
diff changeset
141 /* Return the 'void' type. */
kono
parents:
diff changeset
142
kono
parents:
diff changeset
143 GCC_METHOD0 (gcc_type, void_type)
kono
parents:
diff changeset
144
kono
parents:
diff changeset
145 /* Return the 'bool' type. */
kono
parents:
diff changeset
146
kono
parents:
diff changeset
147 GCC_METHOD0 (gcc_type, bool_type)
kono
parents:
diff changeset
148
kono
parents:
diff changeset
149 /* Create a new array type. If NUM_ELEMENTS is -1, then the array
kono
parents:
diff changeset
150 is assumed to have an unknown length. */
kono
parents:
diff changeset
151
kono
parents:
diff changeset
152 GCC_METHOD2 (gcc_type, build_array_type,
kono
parents:
diff changeset
153 gcc_type, /* Argument ELEMENT_TYPE. */
kono
parents:
diff changeset
154 int) /* Argument NUM_ELEMENTS. */
kono
parents:
diff changeset
155
kono
parents:
diff changeset
156 /* Create a new variably-sized array type. UPPER_BOUND_NAME is the
kono
parents:
diff changeset
157 name of a local variable that holds the upper bound of the array;
kono
parents:
diff changeset
158 it is one less than the array size. */
kono
parents:
diff changeset
159
kono
parents:
diff changeset
160 GCC_METHOD2 (gcc_type, build_vla_array_type,
kono
parents:
diff changeset
161 gcc_type, /* Argument ELEMENT_TYPE. */
kono
parents:
diff changeset
162 const char *) /* Argument UPPER_BOUND_NAME. */
kono
parents:
diff changeset
163
kono
parents:
diff changeset
164 /* Return a qualified variant of a given base type. QUALIFIERS says
kono
parents:
diff changeset
165 which qualifiers to use; it is composed of or'd together
kono
parents:
diff changeset
166 constants from 'enum gcc_qualifiers'. */
kono
parents:
diff changeset
167
kono
parents:
diff changeset
168 GCC_METHOD2 (gcc_type, build_qualified_type,
kono
parents:
diff changeset
169 gcc_type, /* Argument UNQUALIFIED_TYPE. */
kono
parents:
diff changeset
170 enum gcc_qualifiers) /* Argument QUALIFIERS. */
kono
parents:
diff changeset
171
kono
parents:
diff changeset
172 /* Build a complex type given its element type. */
kono
parents:
diff changeset
173
kono
parents:
diff changeset
174 GCC_METHOD1 (gcc_type, build_complex_type,
kono
parents:
diff changeset
175 gcc_type) /* Argument ELEMENT_TYPE. */
kono
parents:
diff changeset
176
kono
parents:
diff changeset
177 /* Build a vector type given its element type and number of
kono
parents:
diff changeset
178 elements. */
kono
parents:
diff changeset
179
kono
parents:
diff changeset
180 GCC_METHOD2 (gcc_type, build_vector_type,
kono
parents:
diff changeset
181 gcc_type, /* Argument ELEMENT_TYPE. */
kono
parents:
diff changeset
182 int) /* Argument NUM_ELEMENTS. */
kono
parents:
diff changeset
183
kono
parents:
diff changeset
184 /* Build a constant. NAME is the constant's name and VALUE is its
kono
parents:
diff changeset
185 value. FILENAME and LINE_NUMBER refer to the type's source
kono
parents:
diff changeset
186 location. If this is not known, FILENAME can be NULL and
kono
parents:
diff changeset
187 LINE_NUMBER can be 0. */
kono
parents:
diff changeset
188
kono
parents:
diff changeset
189 GCC_METHOD5 (int /* bool */, build_constant,
kono
parents:
diff changeset
190 gcc_type, /* Argument TYPE. */
kono
parents:
diff changeset
191 const char *, /* Argument NAME. */
kono
parents:
diff changeset
192 unsigned long, /* Argument VALUE. */
kono
parents:
diff changeset
193 const char *, /* Argument FILENAME. */
kono
parents:
diff changeset
194 unsigned int) /* Argument LINE_NUMBER. */
kono
parents:
diff changeset
195
kono
parents:
diff changeset
196 /* Emit an error and return an error type object. */
kono
parents:
diff changeset
197
kono
parents:
diff changeset
198 GCC_METHOD1 (gcc_type, error,
kono
parents:
diff changeset
199 const char *) /* Argument MESSAGE. */
kono
parents:
diff changeset
200
kono
parents:
diff changeset
201 /* Return an integer type with the given properties. If BUILTIN_NAME
kono
parents:
diff changeset
202 is non-NULL, it must name a builtin integral type with the given
kono
parents:
diff changeset
203 signedness and size, and that is the type that will be returned. */
kono
parents:
diff changeset
204
kono
parents:
diff changeset
205 GCC_METHOD3 (gcc_type, int_type,
kono
parents:
diff changeset
206 int /* bool */, /* Argument IS_UNSIGNED. */
kono
parents:
diff changeset
207 unsigned long, /* Argument SIZE_IN_BYTES. */
kono
parents:
diff changeset
208 const char *) /* Argument BUILTIN_NAME. */
kono
parents:
diff changeset
209
kono
parents:
diff changeset
210 /* Return the 'char' type, a distinct type from both 'signed char' and
kono
parents:
diff changeset
211 'unsigned char' returned by int_type. */
kono
parents:
diff changeset
212
kono
parents:
diff changeset
213 GCC_METHOD0 (gcc_type, char_type)
kono
parents:
diff changeset
214
kono
parents:
diff changeset
215 /* Return a floating point type with the given properties. If BUILTIN_NAME
kono
parents:
diff changeset
216 is non-NULL, it must name a builtin integral type with the given
kono
parents:
diff changeset
217 signedness and size, and that is the type that will be returned. */
kono
parents:
diff changeset
218
kono
parents:
diff changeset
219 GCC_METHOD2 (gcc_type, float_type,
kono
parents:
diff changeset
220 unsigned long, /* Argument SIZE_IN_BYTES. */
kono
parents:
diff changeset
221 const char *) /* Argument BUILTIN_NAME. */
kono
parents:
diff changeset
222