@@ -153,9 +153,164 @@ module _Builtin_intrinsics [system] [extern_c] {
153
153
}
154
154
}
155
155
156
- module _Builtin_stddef_max_align_t [system] [extern_c] {
157
- header "__stddef_max_align_t.h"
156
+ // Start -fbuiltin-headers-in-system-modules affected modules
157
+
158
+ // The following modules all ignore their top level headers
159
+ // when -fbuiltin-headers-in-system-modules is passed, and
160
+ // most of those headers join system modules when present.
161
+
162
+ // e.g. if -fbuiltin-headers-in-system-modules is passed, then
163
+ // float.h will not be in the _Builtin_float module (that module
164
+ // will be empty). If there is a system module that declares
165
+ // `header "float.h"`, then the builtin float.h will join
166
+ // that module. The system float.h (if present) will be treated
167
+ // as a textual header in the sytem module.
168
+ module _Builtin_float [system] {
169
+ header "float.h"
170
+ export *
171
+ }
172
+
173
+ module _Builtin_inttypes [system] {
174
+ header "inttypes.h"
175
+ export *
176
+ }
177
+
178
+ module _Builtin_iso646 [system] {
179
+ header "iso646.h"
180
+ export *
181
+ }
182
+
183
+ module _Builtin_limits [system] {
184
+ header "limits.h"
185
+ export *
186
+ }
187
+
188
+ module _Builtin_stdalign [system] {
189
+ header "stdalign.h"
190
+ export *
191
+ }
192
+
193
+ // When -fbuiltin-headers-in-system-modules is passed, only
194
+ // the top level headers are removed, the implementation headers
195
+ // will always be in their submodules. That means when stdarg.h
196
+ // is included, it will still import this module and make the
197
+ // appropriate submodules visible.
198
+ module _Builtin_stdarg [system] {
199
+ textual header "stdarg.h"
200
+
201
+ explicit module __gnuc_va_list {
202
+ header "__stdarg___gnuc_va_list.h"
203
+ export *
204
+ }
205
+
206
+ explicit module __va_copy {
207
+ header "__stdarg___va_copy.h"
208
+ export *
209
+ }
210
+
211
+ explicit module va_arg {
212
+ header "__stdarg_va_arg.h"
213
+ export *
214
+ }
215
+
216
+ explicit module va_copy {
217
+ header "__stdarg_va_copy.h"
218
+ export *
219
+ }
220
+
221
+ explicit module va_list {
222
+ header "__stdarg_va_list.h"
223
+ export *
224
+ }
225
+ }
226
+
227
+ module _Builtin_stdatomic [system] {
228
+ header "stdatomic.h"
229
+ export *
230
+ }
231
+
232
+ module _Builtin_stdbool [system] {
233
+ header "stdbool.h"
234
+ export *
235
+ }
236
+
237
+ module _Builtin_stddef [system] {
238
+ textual header "stddef.h"
239
+
240
+ explicit module max_align_t {
241
+ header "__stddef_max_align_t.h"
242
+ export *
243
+ }
244
+
245
+ explicit module null {
246
+ header "__stddef_null.h"
247
+ export *
248
+ }
249
+
250
+ explicit module nullptr_t {
251
+ header "__stddef_nullptr_t.h"
252
+ export *
253
+ }
254
+
255
+ explicit module offsetof {
256
+ header "__stddef_offsetof.h"
257
+ export *
258
+ }
259
+
260
+ explicit module ptrdiff_t {
261
+ header "__stddef_ptrdiff_t.h"
262
+ export *
263
+ }
264
+
265
+ explicit module rsize_t {
266
+ header "__stddef_rsize_t.h"
267
+ export *
268
+ }
269
+
270
+ explicit module size_t {
271
+ header "__stddef_size_t.h"
272
+ export *
273
+ }
274
+
275
+ explicit module unreachable {
276
+ header "__stddef_unreachable.h"
277
+ export *
278
+ }
279
+
280
+ explicit module wchar_t {
281
+ header "__stddef_wchar_t.h"
282
+ export *
283
+ }
284
+ }
285
+
286
+ /* wint_t is provided by <wchar.h> and not <stddef.h>. It's here
287
+ * for compatibility, but must be explicitly requested. Therefore
288
+ * __stddef_wint_t.h is not part of _Builtin_stddef. */
289
+ module _Builtin_stddef_wint_t [system] {
290
+ header "__stddef_wint_t.h"
291
+ export *
292
+ }
293
+
294
+ module _Builtin_stdint [system] {
295
+ header "stdint.h"
296
+ export *
297
+ }
298
+
299
+ module _Builtin_stdnoreturn [system] {
300
+ header "stdnoreturn.h"
301
+ export *
302
+ }
303
+
304
+ module _Builtin_tgmath [system] {
305
+ header "tgmath.h"
306
+ export *
307
+ }
308
+
309
+ module _Builtin_unwind [system] {
310
+ header "unwind.h"
311
+ export *
158
312
}
313
+ // End -fbuiltin-headers-in-system-modules affected modules
159
314
160
315
module opencl_c {
161
316
requires opencl
0 commit comments