[libcxx-commits] [libcxx] c5076d8 - Revert "Revert "[libcxx][module-map] creates submodules for private headers""
Christopher Di Bella via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jun 16 09:43:14 PDT 2021
Author: Christopher Di Bella
Date: 2021-06-16T16:36:41Z
New Revision: c5076d83716e8ce93cc76c9f4c3c1006de0be47f
URL: https://github.com/llvm/llvm-project/commit/c5076d83716e8ce93cc76c9f4c3c1006de0be47f
DIFF: https://github.com/llvm/llvm-project/commit/c5076d83716e8ce93cc76c9f4c3c1006de0be47f.diff
LOG: Revert "Revert "[libcxx][module-map] creates submodules for private headers""
This reverts commit d9633f229c36f292dab0e5f510ac635cfaf3a798 as a
workaround was discovered.
Differential Revision: https://reviews.llvm.org/D104170
Added:
Modified:
libcxx/include/module.modulemap
libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_count.pass.cpp
libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_count_sentinel.pass.cpp
libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_sentinel.pass.cpp
libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/special_function.compile.pass.cpp
libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/special_function.compile.pass.cpp
libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/special_function.compile.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/include/module.modulemap b/libcxx/include/module.modulemap
index a6f10a02368a..b28cd0d7cf53 100644
--- a/libcxx/include/module.modulemap
+++ b/libcxx/include/module.modulemap
@@ -295,6 +295,11 @@ module std [system] {
module format {
header "format"
export *
+
+ module __format {
+ module format_error { header "__format/format_error.h" }
+ module format_parse_context { header "__format/format_parse_context.h" }
+ }
}
module forward_list {
header "forward_list"
@@ -346,6 +351,19 @@ module std [system] {
module iterator {
header "iterator"
export *
+
+ module __iterator {
+ module advance { header "__iterator/advance.h" }
+ module concepts { header "__iterator/concepts.h" }
+ module default_sentinel { header "__iterator/default_sentinel.h" }
+ module incrementable_traits { header "__iterator/incrementable_traits.h" }
+ module iter_move { header "__iterator/iter_move.h" }
+ module iterator_traits { header "__iterator/iterator_traits.h" }
+ module next { header "__iterator/next.h" }
+ module prev { header "__iterator/prev.h" }
+ module projected { header "__iterator/projected.h" }
+ module readable_traits { header "__iterator/readable_traits.h" }
+ }
}
module latch {
requires cplusplus14
@@ -373,6 +391,23 @@ module std [system] {
module memory {
header "memory"
export *
+
+ module __memory {
+ module addressof { header "__memory/addressof.h" }
+ module allocation_guard { header "__memory/allocation_guard.h" }
+ module allocator_traits { header "__memory/allocator_traits.h" }
+ module allocator { header "__memory/allocator.h" }
+ module auto_ptr { header "__memory/auto_ptr.h" }
+ module compressed_pair { header "__memory/compressed_pair.h" }
+ module construct_at { header "__memory/construct_at.h" }
+ module pointer_safety { header "__memory/pointer_safety.h" }
+ module pointer_traits { header "__memory/pointer_traits.h" }
+ module raw_storage_iterator { header "__memory/raw_storage_iterator.h" }
+ module shared_ptr { header "__memory/shared_ptr.h" }
+ module temporary_buffer { header "__memory/temporary_buffer.h" }
+ module uninitialized_algorithms { header "__memory/uninitialized_algorithms.h" }
+ module unique_ptr { header "__memory/unique_ptr.h" }
+ }
}
module mutex {
header "mutex"
@@ -415,6 +450,17 @@ module std [system] {
export initializer_list
export iterator
export *
+
+ module __ranges {
+ module access { header "__ranges/access.h" }
+ module concepts { header "__ranges/concepts.h" }
+ module data { header "__ranges/data.h" }
+ module empty { header "__ranges/empty.h" }
+ module enable_borrowed_range { header "__ranges/enable_borrowed_range.h" }
+ module enable_view { header "__ranges/enable_view.h" }
+ module size { header "__ranges/size.h" }
+ module view_interface { header "__ranges/view_interface.h" }
+ }
}
module ratio {
header "ratio"
@@ -512,6 +558,12 @@ module std [system] {
header "utility"
export initializer_list
export *
+
+ module __utility {
+ module to_underlying {
+ header "__utility/to_underlying.h"
+ }
+ }
}
module valarray {
header "valarray"
@@ -532,23 +584,29 @@ module std [system] {
export *
}
+ // __config not modularised due to a bug in Clang
+ // __functional(_03)?_base not modularised since it's designed for textual inclusion
+ // libcpp_version not modularised since it's just a version number
// FIXME: These should be private.
- module __bit_reference { header "__bit_reference" export * }
- module __bits { header "__bits" export * }
- module __debug { header "__debug" export * }
- module __errc { header "__errc" export * }
- module __functional_base { header "__functional_base" export * }
- module __hash_table { header "__hash_table" export * }
- module __locale { header "__locale" export * }
- module __mutex_base { header "__mutex_base" export * }
- module __node_handle { header "__node_handle" export * }
- module __split_buffer { header "__split_buffer" export * }
- module __std_stream { header "__std_stream" export * }
- module __string { header "__string" export * }
+ module __availability { header "__availability" export * }
+ module __bit_reference { header "__bit_reference" export * }
+ module __bits { header "__bits" export * }
+ module __debug { header "__debug" export * }
+ module __errc { header "__errc" export * }
+ module __function_like { header "__function_like.h" export * }
+ module __functional_base { header "__functional_base" export * }
+ module __hash_table { header "__hash_table" export * }
+ module __locale { header "__locale" export * }
+ module __mutex_base { header "__mutex_base" export * }
+ module __node_handle { header "__node_handle" export * }
+ module __nullptr { header "__nullptr" export * }
+ module __split_buffer { header "__split_buffer" export * }
+ module __std_stream { header "__std_stream" export * }
+ module __string { header "__string" export * }
module __threading_support { header "__threading_support" export * }
- module __tree { header "__tree" export * }
- module __tuple { header "__tuple" export * }
- module __undef_macros { header "__undef_macros" export * }
+ module __tree { header "__tree" export * }
+ module __tuple { header "__tuple" export * }
+ module __undef_macros { header "__undef_macros" export * }
module experimental {
requires cplusplus11
diff --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_count.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_count.pass.cpp
index be4d9b61401d..f26e95e0418f 100644
--- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_count.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_count.pass.cpp
@@ -17,11 +17,8 @@
#include <array>
#include <cassert>
-#include "test_standard_function.h"
#include "test_iterators.h"
-static_assert(is_function_like<decltype(std::ranges::advance)>());
-
using range_t = std::array<int, 10>;
template <std::input_or_output_iterator It>
diff --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_count_sentinel.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_count_sentinel.pass.cpp
index 29af3a100832..0a2d03287d0a 100644
--- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_count_sentinel.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_count_sentinel.pass.cpp
@@ -17,11 +17,8 @@
#include <array>
#include <cassert>
-#include "test_standard_function.h"
#include "test_iterators.h"
-static_assert(is_function_like<decltype(std::ranges::advance)>());
-
using range_t = std::array<int, 10>;
class distance_apriori_sentinel {
diff --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_sentinel.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_sentinel.pass.cpp
index 902e7d2b5d58..b70ae9975888 100644
--- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_sentinel.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_sentinel.pass.cpp
@@ -17,11 +17,8 @@
#include <array>
#include <cassert>
-#include "test_standard_function.h"
#include "test_iterators.h"
-static_assert(is_function_like<decltype(std::ranges::advance)>());
-
using range_t = std::array<int, 10>;
class distance_apriori_sentinel {
diff --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/special_function.compile.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/special_function.compile.pass.cpp
index d9aec3c9935c..d1e5bb06c037 100644
--- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/special_function.compile.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/special_function.compile.pass.cpp
@@ -9,11 +9,17 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: libcpp-no-concepts
// UNSUPPORTED: gcc-10
+// XFAIL: clang-11 && modules-build
+// XFAIL: clang-12 && modules-build
// ranges::advance
#include <iterator>
+#include "test_standard_function.h"
+
+static_assert(is_function_like<decltype(std::ranges::advance)>());
+
// FIXME: We're bending the rules here by adding a new type to namespace std::ranges. Since this is
// the standard library's test suite, this should be fine (we *are* the implementation), but it's
// necessary at the time of writing since there aren't any iterators in std::ranges that we can
diff --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/special_function.compile.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/special_function.compile.pass.cpp
index 2f873da6bc42..91132c9918af 100644
--- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/special_function.compile.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/special_function.compile.pass.cpp
@@ -9,6 +9,8 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: libcpp-no-concepts
// UNSUPPORTED: gcc-10
+// XFAIL: clang-11 && modules-build
+// XFAIL: clang-12 && modules-build
// ranges::next
diff --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/special_function.compile.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/special_function.compile.pass.cpp
index 773f98e5c992..68ed26692f31 100644
--- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/special_function.compile.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/special_function.compile.pass.cpp
@@ -9,6 +9,8 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: libcpp-no-concepts
// UNSUPPORTED: gcc-10
+// XFAIL: clang-11 && modules-build
+// XFAIL: clang-12 && modules-build
// ranges::prev
More information about the libcxx-commits
mailing list