[libcxx-commits] [clang] [libcxx] [libc++][modules] Rewrite the modulemap to have fewer top-level modules (PR #110501)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Sep 30 07:15:58 PDT 2024
================
@@ -1,2125 +1,2235 @@
-// Main C++ standard library interfaces
-module std_algorithm [system] {
- header "algorithm"
- export *
-}
-module std_any [system] {
- header "any"
- export *
-}
-module std_array [system] {
- header "array"
- export *
-}
-module std_atomic [system] {
- header "atomic"
- export *
-}
-module std_barrier [system] {
- header "barrier"
- export *
-}
-module std_bit [system] {
- header "bit"
- export *
-}
-module std_bitset [system] {
- header "bitset"
- export *
-}
-module std_charconv [system] {
- header "charconv"
- module chars_format { header "__charconv/chars_format.h" }
- module from_chars_integral { header "__charconv/from_chars_integral.h" }
- module from_chars_result { header "__charconv/from_chars_result.h" }
- module tables { header "__charconv/tables.h" }
- module to_chars { header "__charconv/to_chars.h" }
- module to_chars_base_10 { header "__charconv/to_chars_base_10.h" }
- module to_chars_floating_point { header "__charconv/to_chars_floating_point.h" }
- module to_chars_integral { header "__charconv/to_chars_integral.h" }
- module to_chars_result { header "__charconv/to_chars_result.h" }
- module traits { header "__charconv/traits.h" }
- export *
-}
-module std_chrono [system] {
- header "chrono"
- export *
-}
-module std_codecvt [system] {
- header "codecvt"
- export *
-}
-module std_compare [system] {
- header "compare"
- export *
-}
-module std_complex [system] {
- header "complex"
- export *
-}
-module std_concepts [system] {
- header "concepts"
- export *
-}
-module std_condition_variable [system] {
- header "condition_variable"
- module condition_variable { header "__condition_variable/condition_variable.h" }
- export *
-}
-module std_coroutine [system] {
- header "coroutine"
- module coroutine_handle { header "__coroutine/coroutine_handle.h" }
- module coroutine_traits { header "__coroutine/coroutine_traits.h" }
- module noop_coroutine_handle { header "__coroutine/noop_coroutine_handle.h" }
- module trivial_awaitables { header "__coroutine/trivial_awaitables.h" }
- export *
-}
-module std_deque [system] {
- header "deque"
- export *
-}
-module std_exception [system] {
- header "exception"
- export *
-}
-module std_execution [system] {
- header "execution"
- export *
-}
-module std_expected [system] {
- header "expected"
- export *
-}
-module std_filesystem [system] {
- header "filesystem"
- module copy_options { header "__filesystem/copy_options.h" }
- module directory_entry { header "__filesystem/directory_entry.h" }
- module directory_iterator { header "__filesystem/directory_iterator.h" }
- module directory_options { header "__filesystem/directory_options.h" }
- module file_status { header "__filesystem/file_status.h" }
- module file_time_type { header "__filesystem/file_time_type.h" }
- module file_type { header "__filesystem/file_type.h" }
- module filesystem_error {
- header "__filesystem/filesystem_error.h"
- export std_private_memory_shared_ptr
- }
- module operations { header "__filesystem/operations.h" }
- module path {
- header "__filesystem/path.h"
- export std_string // returned by various methods
- }
- module path_iterator { header "__filesystem/path_iterator.h" }
- module perm_options { header "__filesystem/perm_options.h" }
- module perms { header "__filesystem/perms.h" }
- module recursive_directory_iterator { header "__filesystem/recursive_directory_iterator.h" }
- module space_info { header "__filesystem/space_info.h" }
- module u8path { header "__filesystem/u8path.h" }
- export *
-}
-module std_format [system] {
- header "format"
- export *
-}
-module std_forward_list [system] {
- header "forward_list"
- export *
-}
-module std_fstream [system] {
- header "fstream"
- export *
-}
-module std_functional [system] {
- header "functional"
- export *
-}
-module std_future [system] {
- header "future"
- export *
-}
-module std_initializer_list [system] {
- header "initializer_list"
- export *
-}
-module std_iomanip [system] {
- header "iomanip"
- export *
-}
-module std_ios [system] {
- header "ios"
- export *
-}
-module std_iosfwd [system] {
- header "iosfwd"
- export *
-}
-module std_iostream [system] {
- header "iostream"
- export *
-}
-module std_istream [system] {
- header "istream"
- export *
-}
-module std_iterator [system] {
- header "iterator"
- export *
-}
-module std_latch [system] {
- header "latch"
- export *
-}
-module std_limits [system] {
- header "limits"
- export *
-}
-module std_list [system] {
- header "list"
- export *
-}
-module std_locale [system] {
- header "locale"
- export *
-}
-module std_map [system] {
- header "map"
- export *
+// This module contains headers related to the configuration of the library. These headers
+// are free of any dependency on the rest of libc++.
+module std_config [system] {
+ textual header "__config"
+ textual header "__configuration/abi.h"
+ textual header "__configuration/availability.h"
+ textual header "__configuration/compiler.h"
+ textual header "__configuration/language.h"
+ textual header "__configuration/platform.h"
+ textual header "version"
}
-module std_mdspan [system] {
- header "mdspan"
- module default_accessor { header "__mdspan/default_accessor.h" }
- module extents { header "__mdspan/extents.h" }
- module fwd { header "__fwd/mdspan.h" }
- module layout_left { header "__mdspan/layout_left.h" }
- module layout_right { header "__mdspan/layout_right.h" }
- module layout_stride { header "__mdspan/layout_stride.h" }
- module mdspan {
- header "__mdspan/mdspan.h"
- export std_array // for strides()
+
+module std_core [system] {
+ module cstddef {
+ module byte { header "__cstddef/byte.h" }
+ module max_align_t { header "__cstddef/max_align_t.h" }
+ module nullptr_t { header "__cstddef/nullptr_t.h" }
+ module ptrdiff_t { header "__cstddef/ptrdiff_t.h" }
+ module size_t { header "__cstddef/size_t.h" }
}
- export *
-}
-module std_memory [system] {
- header "memory"
- export *
-}
-module std_memory_resource [system] {
- header "memory_resource"
- export *
-}
-module std_mutex [system] {
- header "mutex"
- export *
-}
-module std_new [system] {
- header "new"
- export *
-}
-module std_numbers [system] {
- header "numbers"
- export *
-}
-module std_numeric [system] {
- header "numeric"
- export *
-}
-module std_optional [system] {
- header "optional"
- export *
-}
-module std_ostream [system] {
- header "ostream"
- export *
-}
-module std_print [system] {
- header "print"
- export *
-}
-module std_queue [system] {
- header "queue"
- export *
-}
-module std_random [system] {
- header "random"
- export *
-}
-module std_ranges [system] {
- header "ranges"
- export *
-}
-module std_ratio [system] {
- header "ratio"
- export *
-}
-module std_regex [system] {
- header "regex"
- export *
-}
-module std_scoped_allocator [system] {
- header "scoped_allocator"
- export *
-}
-module std_semaphore [system] {
- header "semaphore"
- export *
-}
-module std_set [system] {
- header "set"
- export *
-}
-module std_shared_mutex [system] {
- header "shared_mutex"
- export std_version
-}
-module std_source_location [system] {
- header "source_location"
- export *
-}
-module std_span [system] {
- header "span"
- export std_private_ranges_enable_borrowed_range
- export std_version
- export std_private_span_span_fwd
-}
-module std_sstream [system] {
- header "sstream"
- export *
-}
-module std_stack [system] {
- header "stack"
- export *
-}
-module std_stdexcept [system] {
- header "stdexcept"
- export *
-}
-module std_stop_token [system] {
- header "stop_token"
- private header "__stop_token/atomic_unique_lock.h"
- private header "__stop_token/intrusive_list_view.h"
- private header "__stop_token/intrusive_shared_ptr.h"
- private header "__stop_token/stop_callback.h"
- private header "__stop_token/stop_source.h"
- private header "__stop_token/stop_state.h"
- private header "__stop_token/stop_token.h"
- export *
-}
-module std_streambuf [system] {
- header "streambuf"
- export *
-}
-module std_string [system] {
- header "string"
- export *
-}
-module std_string_view [system] {
- header "string_view"
- export *
-}
-module std_strstream [system] {
- header "strstream"
- export *
-}
-module std_syncstream [system] {
- header "syncstream"
- export *
-}
-module std_system_error [system] {
- header "system_error"
- export *
-}
-module std_thread [system] {
- header "thread"
- export *
-}
-module std_tuple [system] {
- header "tuple"
- export *
-}
-module std_type_traits [system] {
- header "type_traits"
- export *
-}
-module std_typeindex [system] {
- header "typeindex"
- export *
-}
-module std_typeinfo [system] {
- header "typeinfo"
- export *
-}
-module std_unordered_map [system] {
- header "unordered_map"
- export *
-}
-module std_unordered_set [system] {
- header "unordered_set"
- export *
-}
-module std_utility [system] {
- header "utility"
- export *
-}
-module std_valarray [system] {
- header "valarray"
- export *
-}
-module std_variant [system] {
- header "variant"
- export *
-}
-module std_vector [system] {
- header "vector"
- export *
-}
-module std_version [system] {
- header "version"
- export *
-}
-// C standard library interface wrappers
-module std_cassert [system] {
- // <cassert>'s use of NDEBUG requires textual inclusion.
- textual header "cassert"
-}
-module std_ccomplex [system] {
- header "ccomplex"
- export *
-}
-module std_cctype [system] {
- header "cctype"
- export *
-}
-module std_cerrno [system] {
- header "cerrno"
- export *
-}
-module std_cfenv [system] {
- header "cfenv"
- export *
-}
-module std_cfloat [system] {
- header "cfloat"
- export *
-}
-module std_cinttypes [system] {
- header "cinttypes"
- export *
-}
-module std_ciso646 [system] {
- header "ciso646"
- export *
-}
-module std_climits [system] {
- header "climits"
- export *
-}
-module std_clocale [system] {
- header "clocale"
- export *
-}
-module std_cmath [system] {
- header "cmath"
- export *
-}
-module std_csetjmp [system] {
- header "csetjmp"
- export *
-}
-module std_csignal [system] {
- header "csignal"
- export *
-}
-// FIXME: <cstdalign> is missing.
-module std_cstdarg [system] {
- header "cstdarg"
- export *
-}
-module std_cstdbool [system] {
- header "cstdbool"
- export *
-}
-module std_cstddef [system] {
- header "cstddef"
- module byte { header "__cstddef/byte.h" }
- module max_align_t { header "__cstddef/max_align_t.h" }
- module nullptr_t { header "__cstddef/nullptr_t.h" }
- module ptrdiff_t { header "__cstddef/ptrdiff_t.h" }
- module size_t { header "__cstddef/size_t.h" }
- export *
-}
-module std_cstdint [system] {
- header "cstdint"
- export *
-}
-module std_cstdio [system] {
- header "cstdio"
- export *
-}
-module std_cstdlib [system] {
- header "cstdlib"
- export *
-}
-module std_cstring [system] {
- header "cstring"
- export *
-}
-module std_ctgmath [system] {
- header "ctgmath"
- export *
-}
-module std_ctime [system] {
- header "ctime"
- export *
-}
-module std_cuchar [system] {
- header "cuchar"
- export *
-}
-module std_cwchar [system] {
- header "cwchar"
- export *
-}
-module std_cwctype [system] {
- header "cwctype"
- export *
-}
+ module cstdint {
+ header "cstdint"
+ export *
+ }
-// C standard library interfaces augmented/replaced in C++
-// <assert.h> provided by C library.
-module std_complex_h [system] {
- header "complex.h"
- export *
-}
-module std_ctype_h [system] {
- header "ctype.h"
- export *
-}
-module std_errno_h [system] {
- header "errno.h"
- export *
-}
-module std_fenv_h [system] {
- header "fenv.h"
- export *
-}
-module std_float_h [system] {
- header "float.h"
- export *
-}
-module std_inttypes_h [system] {
- header "inttypes.h"
- export *
-}
-// <iso646.h> provided by compiler.
-module std_locale_h [system] {
- header "locale.h"
- export *
-}
-module std_math_h [system] {
- header "math.h"
- export *
-}
-// <setjmp.h> provided by C library.
-// <signal.h> provided by C library.
-// FIXME: <stdalign.h> is missing.
-// <stdarg.h> provided by compiler.
-module std_stdatomic_h [system] {
- header "stdatomic.h"
- export *
-}
-module std_stdbool_h [system] {
- // <stdbool.h>'s __bool_true_false_are_defined macro requires textual inclusion.
- textual header "stdbool.h"
- export *
-}
-module std_stddef_h [system] {
- // <stddef.h>'s __need_* macros require textual inclusion.
- textual header "stddef.h"
- export *
-}
-module std_stdint_h [system] {
- header "stdint.h"
- export *
-}
-module std_stdio_h [system] {
- // <stdio.h>'s __need_* macros require textual inclusion.
- textual header "stdio.h"
- export *
-}
-module std_stdlib_h [system] {
- // <stdlib.h>'s __need_* macros require textual inclusion.
- textual header "stdlib.h"
- export *
-}
-module std_string_h [system] {
- header "string.h"
- export *
-}
-module std_tgmath_h [system] {
- header "tgmath.h"
- export *
-}
-module std_uchar_h [system] {
- header "uchar.h"
- export *
-}
-// <time.h> provided by C library.
-module std_wchar_h [system] {
- // <wchar.h>'s __need_* macros require textual inclusion.
- textual header "wchar.h"
- export *
-}
-module std_wctype_h [system] {
- header "wctype.h"
- export *
-}
+ module fwd {
+ module byte { header "__fwd/byte.h" }
+ module functional { header "__fwd/functional.h" }
+ module pair { header "__fwd/pair.h" }
+ module tuple { header "__fwd/tuple.h" }
+ }
+
+ module limits {
+ header "limits"
+ export *
+ }
+
+ module math {
+ module abs { header "__math/abs.h" }
+ module copysign { header "__math/copysign.h" }
+ module error_functions { header "__math/error_functions.h" }
+ module exponential_functions { header "__math/exponential_functions.h" }
+ module fdim { header "__math/fdim.h" }
+ module fma { header "__math/fma.h" }
+ module gamma { header "__math/gamma.h" }
+ module hyperbolic_functions { header "__math/hyperbolic_functions.h" }
+ module hypot { header "__math/hypot.h" }
+ module inverse_hyperbolic_functions { header "__math/inverse_hyperbolic_functions.h" }
+ module inverse_trigonometric_functions { header "__math/inverse_trigonometric_functions.h" }
+ module logarithms { header "__math/logarithms.h" }
+ module min_max { header "__math/min_max.h" }
+ module modulo { header "__math/modulo.h" }
+ module remainder { header "__math/remainder.h" }
+ module roots { header "__math/roots.h" }
+ module rounding_functions { header "__math/rounding_functions.h" }
+ module special_functions { header "__math/special_functions.h" }
+ module traits { header "__math/traits.h" }
+ module trigonometric_functions { header "__math/trigonometric_functions.h" }
+ }
+
+ module type_traits {
+ module add_const { header "__type_traits/add_const.h" }
+ module add_cv { header "__type_traits/add_cv.h" }
+ module add_lvalue_reference { header "__type_traits/add_lvalue_reference.h" }
+ module add_pointer { header "__type_traits/add_pointer.h" }
+ module add_rvalue_reference { header "__type_traits/add_rvalue_reference.h" }
+ module add_volatile { header "__type_traits/add_volatile.h" }
+ module aligned_storage { header "__type_traits/aligned_storage.h" }
+ module aligned_union { header "__type_traits/aligned_union.h" }
+ module alignment_of { header "__type_traits/alignment_of.h" }
+ module can_extract_key { header "__type_traits/can_extract_key.h" }
+ module common_reference { header "__type_traits/common_reference.h" }
+ module common_type { header "__type_traits/common_type.h" }
----------------
frederick-vs-ja wrote:
As the CI failure is related to `common_type`, should we export this?
https://github.com/llvm/llvm-project/pull/110501
More information about the libcxx-commits
mailing list