diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt --- a/libcxx/include/CMakeLists.txt +++ b/libcxx/include/CMakeLists.txt @@ -121,6 +121,7 @@ math.h memory module.modulemap + module.private.modulemap mutex new numbers diff --git a/libcxx/include/__memory/allocator_traits.h b/libcxx/include/__memory/allocator_traits.h --- a/libcxx/include/__memory/allocator_traits.h +++ b/libcxx/include/__memory/allocator_traits.h @@ -13,7 +13,7 @@ #include <__config> #include <__memory/base.h> #include <__memory/pointer_traits.h> -#include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/libcxx/include/__memory/pointer_traits.h b/libcxx/include/__memory/pointer_traits.h --- a/libcxx/include/__memory/pointer_traits.h +++ b/libcxx/include/__memory/pointer_traits.h @@ -11,7 +11,7 @@ #define _LIBCPP___MEMORY_POINTER_TRAITS_H #include <__config> -#include +#include <__memory/base.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/libcxx/include/__memory/utilities.h b/libcxx/include/__memory/utilities.h --- a/libcxx/include/__memory/utilities.h +++ b/libcxx/include/__memory/utilities.h @@ -12,7 +12,6 @@ #include <__config> #include <__memory/allocator_traits.h> -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/libcxx/include/__sso_allocator b/libcxx/include/__sso_allocator --- a/libcxx/include/__sso_allocator +++ b/libcxx/include/__sso_allocator @@ -11,9 +11,8 @@ #define _LIBCPP___SSO_ALLOCATOR #include <__config> -#include -#include #include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header diff --git a/libcxx/include/module.modulemap b/libcxx/include/module.modulemap --- a/libcxx/include/module.modulemap +++ b/libcxx/include/module.modulemap @@ -1,10 +1,3 @@ -// define the module for __config outside of the top level 'std' module -// since __config may be included from C headers which may create an -// include cycle. -module std_config [system] [extern_c] { - header "__config" -} - module std [system] { export std_config // FIXME: The standard does not require that each of these submodules @@ -531,13 +524,15 @@ module __locale { header "__locale" export * } module __mutex_base { header "__mutex_base" export * } module __split_buffer { header "__split_buffer" export * } - module __sso_allocator { header "__sso_allocator" export * } - module __std_stream { header "__std_stream" export * } module __string { header "__string" export * } module __tree { header "__tree" export * } module __tuple { header "__tuple" export * } module __undef_macros { header "__undef_macros" export * } module __node_handle { header "__node_handle" export * } + module __memory_pointer_traits { header "__memory/pointer_traits.h" export * } + module __memory_allocator_traits { header "__memory/allocator_traits.h" export * } + module __memory_base { header "__memory/base.h" export * } + module __memory_utilities { header "__memory/utilities.h" export * } module experimental { requires cplusplus11 diff --git a/libcxx/include/module.private.modulemap b/libcxx/include/module.private.modulemap new file mode 100644 --- /dev/null +++ b/libcxx/include/module.private.modulemap @@ -0,0 +1,7 @@ +module std_Private { + + module __sso_allocator { header "__sso_allocator" export * } + module __std_stream { header "__std_stream" export * } + + module __support { umbrella "support" export * } +}