xref: /freebsd/contrib/llvm-project/libcxx/include/module.modulemap (revision 6be3386466ab79a84b48429ae66244f21526d3df)
1// define the module for __config outside of the top level 'std' module
2// since __config may be included from C headers which may create an
3// include cycle.
4module std_config [system] [extern_c] {
5    header "__config"
6}
7
8module std [system] {
9  export std_config
10  // FIXME: The standard does not require that each of these submodules
11  // re-exports its imported modules. We should provide an alternative form of
12  // export that issues a warning if a name from the submodule is used, and
13  // use that to provide a 'strict mode' for libc++.
14
15  // Deprecated C-compatibility headers. These can all be included from within
16  // an 'extern "C"' context.
17  module depr [extern_c] {
18    // <assert.h> provided by C library.
19    module ctype_h {
20      header "ctype.h"
21      export *
22    }
23    module errno_h {
24      header "errno.h"
25      export *
26    }
27    module fenv_h {
28      header "fenv.h"
29      export *
30    }
31    // <float.h> provided by compiler or C library.
32    module inttypes_h {
33      header "inttypes.h"
34      export stdint_h
35      export *
36    }
37    // <iso646.h> provided by compiler.
38    // <limits.h> provided by compiler or C library.
39    module locale_h {
40      header "locale.h"
41      export *
42    }
43    module math_h {
44      header "math.h"
45      export *
46    }
47    module setjmp_h {
48      header "setjmp.h"
49      export *
50    }
51    // FIXME: <stdalign.h> is missing.
52    // <signal.h> provided by C library.
53    // <stdarg.h> provided by compiler.
54    // <stdbool.h> provided by compiler.
55    module stddef_h {
56      // <stddef.h>'s __need_* macros require textual inclusion.
57      textual header "stddef.h"
58    }
59    module stdint_h {
60      header "stdint.h"
61      export *
62      // FIXME: This module only exists on OS X and for some reason the
63      // wildcard above doesn't export it.
64      export Darwin.C.stdint
65    }
66    module stdio_h {
67      // <stdio.h>'s __need_* macros require textual inclusion.
68      textual header "stdio.h"
69      export *
70      export Darwin.C.stdio
71    }
72    module stdlib_h {
73      // <stdlib.h>'s __need_* macros require textual inclusion.
74      textual header "stdlib.h"
75      export *
76    }
77    module string_h {
78      header "string.h"
79      export *
80    }
81    // FIXME: <uchar.h> is missing.
82    // <time.h> provided by C library.
83    module wchar_h {
84      // <wchar.h>'s __need_* macros require textual inclusion.
85      textual header "wchar.h"
86      export *
87    }
88    module wctype_h {
89      header "wctype.h"
90      export *
91    }
92  }
93
94  // <complex.h> and <tgmath.h> are not C headers in any real sense, do not
95  // allow their use in extern "C" contexts.
96  module complex_h {
97    header "complex.h"
98    export ccomplex
99    export *
100  }
101  module tgmath_h {
102    header "tgmath.h"
103    export ccomplex
104    export cmath
105    export *
106  }
107
108  // C compatibility headers.
109  module compat {
110    module cassert {
111      // <cassert>'s use of NDEBUG requires textual inclusion.
112      textual header "cassert"
113    }
114    module ccomplex {
115      header "ccomplex"
116      export complex
117      export *
118    }
119    module cctype {
120      header "cctype"
121      export *
122    }
123    module cerrno {
124      header "cerrno"
125      export *
126    }
127    module cfenv {
128      header "cfenv"
129      export *
130    }
131    module cfloat {
132      header "cfloat"
133      export *
134    }
135    module cinttypes {
136      header "cinttypes"
137      export cstdint
138      export *
139    }
140    module ciso646 {
141      header "ciso646"
142      export *
143    }
144    module climits {
145      header "climits"
146      export *
147    }
148    module clocale {
149      header "clocale"
150      export *
151    }
152    module cmath {
153      header "cmath"
154      export *
155    }
156    module csetjmp {
157      header "csetjmp"
158      export *
159    }
160    module csignal {
161      header "csignal"
162      export *
163    }
164    // FIXME: <cstdalign> is missing.
165    module cstdarg {
166      header "cstdarg"
167      export *
168    }
169    module cstdbool {
170      header "cstdbool"
171      export *
172    }
173    module cstddef {
174      header "cstddef"
175      export *
176    }
177    module cstdint {
178      header "cstdint"
179      export depr.stdint_h
180      export *
181    }
182    module cstdio {
183      header "cstdio"
184      export *
185    }
186    module cstdlib {
187      header "cstdlib"
188      export *
189    }
190    module cstring {
191      header "cstring"
192      export *
193    }
194    module ctgmath {
195      header "ctgmath"
196      export ccomplex
197      export cmath
198      export *
199    }
200    module ctime {
201      header "ctime"
202      export *
203    }
204    // FIXME: <cuchar> is missing.
205    module cwchar {
206      header "cwchar"
207      export depr.stdio_h
208      export *
209    }
210    module cwctype {
211      header "cwctype"
212      export *
213    }
214  }
215
216  module algorithm {
217    header "algorithm"
218    export initializer_list
219    export *
220  }
221  module any {
222    header "any"
223    export *
224  }
225  module array {
226    header "array"
227    export initializer_list
228    export *
229  }
230  module atomic {
231    header "atomic"
232    export *
233  }
234  module barrier {
235    requires cplusplus14
236    header "barrier"
237    export *
238  }
239  module bit {
240    header "bit"
241    export *
242  }
243  module bitset {
244    header "bitset"
245    export string
246    export iosfwd
247    export *
248  }
249  // No submodule for cassert. It fundamentally needs repeated, textual inclusion.
250  module charconv {
251    header "charconv"
252    export *
253  }
254  module chrono {
255    header "chrono"
256    export *
257  }
258  module codecvt {
259    header "codecvt"
260    export *
261  }
262  module compare {
263    header "compare"
264    export *
265  }
266  module complex {
267    header "complex"
268    export *
269  }
270  module concepts {
271    header "concepts"
272    export *
273  }
274  module condition_variable {
275    header "condition_variable"
276    export *
277  }
278  module deque {
279    header "deque"
280    export initializer_list
281    export *
282  }
283  module exception {
284    header "exception"
285    export *
286  }
287  module execution {
288    header "execution"
289    export *
290  }
291  module filesystem {
292    header "filesystem"
293    export *
294  }
295  module forward_list {
296    header "forward_list"
297    export initializer_list
298    export *
299  }
300  module fstream {
301    header "fstream"
302    export *
303  }
304  module functional {
305    header "functional"
306    export *
307  }
308  module future {
309    header "future"
310    export *
311  }
312  module initializer_list {
313    header "initializer_list"
314    export *
315  }
316  module iomanip {
317    header "iomanip"
318    export *
319  }
320  module ios {
321    header "ios"
322    export iosfwd
323    export *
324  }
325  module iosfwd {
326    header "iosfwd"
327    export *
328  }
329  module iostream {
330    header "iostream"
331    export ios
332    export streambuf
333    export istream
334    export ostream
335    export *
336  }
337  module istream {
338    header "istream"
339    // FIXME: should re-export ios, streambuf?
340    export *
341  }
342  module iterator {
343    header "iterator"
344    export *
345  }
346  module latch {
347    requires cplusplus14
348    header "latch"
349    export *
350  }
351  module limits {
352    header "limits"
353    export *
354  }
355  module list {
356    header "list"
357    export initializer_list
358    export *
359  }
360  module locale {
361    header "locale"
362    export *
363  }
364  module map {
365    header "map"
366    export initializer_list
367    export *
368  }
369  module memory {
370    header "memory"
371    export *
372  }
373  module mutex {
374    header "mutex"
375    export *
376  }
377  module new {
378    header "new"
379    export *
380  }
381  module numbers {
382    header "numbers"
383    export *
384  }
385  module numeric {
386    header "numeric"
387    export *
388  }
389  module optional {
390    header "optional"
391    export *
392  }
393  module ostream {
394    header "ostream"
395    // FIXME: should re-export ios, streambuf?
396    export *
397  }
398  module queue {
399    header "queue"
400    export initializer_list
401    export *
402  }
403  module random {
404    header "random"
405    export initializer_list
406    export *
407  }
408  module ratio {
409    header "ratio"
410    export *
411  }
412  module regex {
413    header "regex"
414    export initializer_list
415    export *
416  }
417  module scoped_allocator {
418    header "scoped_allocator"
419    export *
420  }
421  module semaphore {
422    requires cplusplus14
423    header "semaphore"
424    export *
425  }
426  module set {
427    header "set"
428    export initializer_list
429    export *
430  }
431  module sstream {
432    header "sstream"
433    // FIXME: should re-export istream, ostream, ios, streambuf, string?
434    export *
435  }
436  module stack {
437    header "stack"
438    export initializer_list
439    export *
440  }
441  module stdexcept {
442    header "stdexcept"
443    export *
444  }
445  module streambuf {
446    header "streambuf"
447    export *
448  }
449  module string {
450    header "string"
451    export initializer_list
452    export string_view
453    export __string
454    export *
455  }
456  module string_view {
457    header "string_view"
458    export initializer_list
459    export __string
460    export *
461  }
462  module strstream {
463    header "strstream"
464    export *
465  }
466  module system_error {
467    header "system_error"
468    export *
469  }
470  module thread {
471    header "thread"
472    export *
473  }
474  module tuple {
475    header "tuple"
476    export *
477  }
478  module type_traits {
479    header "type_traits"
480    export *
481  }
482  module typeindex {
483    header "typeindex"
484    export *
485  }
486  module typeinfo {
487    header "typeinfo"
488    export *
489  }
490  module unordered_map {
491    header "unordered_map"
492    export initializer_list
493    export *
494  }
495  module unordered_set {
496    header "unordered_set"
497    export initializer_list
498    export *
499  }
500  module utility {
501    header "utility"
502    export initializer_list
503    export *
504  }
505  module valarray {
506    header "valarray"
507    export initializer_list
508    export *
509  }
510  module variant {
511    header "variant"
512    export *
513  }
514  module vector {
515    header "vector"
516    export initializer_list
517    export *
518  }
519  module version {
520    header "version"
521    export *
522  }
523
524  // FIXME: These should be private.
525  module __bit_reference { header "__bit_reference" export * }
526  module __debug { header "__debug" export * }
527  module __errc { header "__errc" export * }
528  module __functional_base { header "__functional_base" export * }
529  module __hash_table { header "__hash_table" export * }
530  module __locale { header "__locale" export * }
531  module __mutex_base { header "__mutex_base" export * }
532  module __split_buffer { header "__split_buffer" export * }
533  module __sso_allocator { header "__sso_allocator" export * }
534  module __std_stream { header "__std_stream" export * }
535  module __string { header "__string" export * }
536  module __tree { header "__tree" export * }
537  module __tuple { header "__tuple" export * }
538  module __undef_macros { header "__undef_macros" export * }
539  module __node_handle { header "__node_handle" export * }
540
541  module experimental {
542    requires cplusplus11
543
544    module algorithm {
545      header "experimental/algorithm"
546      export *
547    }
548     module coroutine {
549      requires coroutines
550      header "experimental/coroutine"
551      export *
552    }
553    module deque {
554      header "experimental/deque"
555      export *
556    }
557    module filesystem {
558      header "experimental/filesystem"
559      export *
560    }
561    module forward_list {
562      header "experimental/forward_list"
563      export *
564    }
565    module functional {
566      header "experimental/functional"
567      export *
568    }
569    module iterator {
570      header "experimental/iterator"
571      export *
572    }
573    module list {
574      header "experimental/list"
575      export *
576    }
577    module map {
578      header "experimental/map"
579      export *
580    }
581    module memory_resource {
582      header "experimental/memory_resource"
583      export *
584    }
585    module propagate_const {
586      header "experimental/propagate_const"
587      export *
588    }
589    module regex {
590      header "experimental/regex"
591      export *
592    }
593    module simd {
594      header "experimental/simd"
595      export *
596    }
597    module set {
598      header "experimental/set"
599      export *
600    }
601    module span {
602      header "span"
603      export *
604    }
605    module string {
606      header "experimental/string"
607      export *
608    }
609    module type_traits {
610      header "experimental/type_traits"
611      export *
612    }
613    module unordered_map {
614      header "experimental/unordered_map"
615      export *
616    }
617    module unordered_set {
618      header "experimental/unordered_set"
619      export *
620    }
621    module utility {
622      header "experimental/utility"
623      export *
624    }
625    module vector {
626      header "experimental/vector"
627      export *
628    }
629    // FIXME these should be private
630    module __memory {
631      header "experimental/__memory"
632      export *
633    }
634  } // end experimental
635}
636