[libcxx][modularisation] adds several headers to the module map
authorChristopher Di Bella <cjdb@google.com>
Thu, 15 Jul 2021 06:41:17 +0000 (06:41 +0000)
committerChristopher Di Bella <cjdb@google.com>
Fri, 16 Jul 2021 16:06:54 +0000 (16:06 +0000)
* <__algorithm/iter_swap.h>
* <__algorithm/swap_ranges.h>
* <__functional/is_transparent.h>
* <__memory/uses_allocator.h>
* <__ranges/drop_view.h>
* <__ranges/transform_view.h>
* <shared_mutex>
* <span>

Also updates header inclusions that were affected.

**NOTE:** This is a proper subset of D105932. Since the content has
already been LGTM'd, I intend to merge this patch without review,
pending green CI. I decided it would be better to move these changes
into their own commit since the former patch has undergone further
changes and will need yet another light review. In the event any of
that gets rolled back (for whatever reason), the changes in this patch
won't be affected.

Differential Revision: https://reviews.llvm.org/D106040

23 files changed:
libcxx/include/__ranges/drop_view.h
libcxx/include/__ranges/transform_view.h
libcxx/include/module.modulemap
libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/assign.copy.pass.cpp
libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/assign.move.pass.cpp
libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/ctor.default.pass.cpp
libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/ctor.in_place.pass.cpp
libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/deref.pass.cpp
libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/has_value.pass.cpp
libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/no_unique_address.pass.cpp
libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/properties.compile.pass.cpp
libcxx/test/std/containers/views/span.sub/first.fail.cpp
libcxx/test/std/containers/views/span.sub/last.fail.cpp
libcxx/test/std/containers/views/span.sub/subspan.fail.cpp
libcxx/test/std/ranges/range.adaptors/range.drop/dangling.cache.pass.cpp
libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_adopt_lock.pass.cpp
libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_defer_lock.pass.cpp
libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock.pass.cpp
libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock_for.pass.cpp
libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/try_lock_until.pass.cpp
libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/unlock.pass.cpp
libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.obs/op_bool.pass.cpp
libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/types.pass.cpp

index fe5b803..7ba74e5 100644 (file)
@@ -15,6 +15,9 @@
 #include <__iterator/next.h>
 #include <__ranges/access.h>
 #include <__ranges/all.h>
+#include <__ranges/concepts.h>
+#include <__ranges/enable_borrowed_range.h>
+#include <__ranges/size.h>
 #include <__ranges/view_interface.h>
 #include <optional>
 #include <type_traits>
index b86cdd3..2d6f62d 100644 (file)
@@ -18,7 +18,9 @@
 #include <__ranges/concepts.h>
 #include <__ranges/copyable_box.h>
 #include <__ranges/empty.h>
+#include <__ranges/size.h>
 #include <__ranges/view_interface.h>
+#include <concepts>
 #include <type_traits>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
index c2e6564..0766593 100644 (file)
@@ -254,6 +254,7 @@ module std [system] {
       module is_permutation           { header "__algorithm/is_permutation.h" }
       module is_sorted                { header "__algorithm/is_sorted.h" }
       module is_sorted_until          { header "__algorithm/is_sorted_until.h" }
+      module iter_swap                { header "__algorithm/iter_swap.h" }
       module lexicographical_compare  { header "__algorithm/lexicographical_compare.h" }
       module lower_bound              { header "__algorithm/lower_bound.h" }
       module make_heap                { header "__algorithm/make_heap.h" }
@@ -305,6 +306,7 @@ module std [system] {
       module sort_heap                { header "__algorithm/sort_heap.h" }
       module stable_partition         { header "__algorithm/stable_partition.h" }
       module stable_sort              { header "__algorithm/stable_sort.h" }
+      module swap_ranges              { header "__algorithm/swap_ranges.h" }
       module transform                { header "__algorithm/transform.h" }
       module unique                   { header "__algorithm/unique.h" }
       module unique_copy              { header "__algorithm/unique_copy.h" }
@@ -419,6 +421,7 @@ module std [system] {
       module function                   { header "__functional/function.h" }
       module hash                       { header "__functional/hash.h" }
       module identity                   { header "__functional/identity.h" }
+      module is_transparent             { header "__functional/is_transparent.h" }
       module invoke                     { header "__functional/invoke.h" }
       module mem_fn                     { header "__functional/mem_fn.h"  }
       module mem_fun_ref                { header "__functional/mem_fun_ref.h"  }
@@ -548,6 +551,7 @@ module std [system] {
       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 uses_allocator           { header "__memory/uses_allocator.h"           }
     }
   }
   module mutex {
@@ -602,6 +606,7 @@ module std [system] {
       module concepts               { header "__ranges/concepts.h"              }
       module copyable_box           { header "__ranges/copyable_box.h"          }
       module data                   { header "__ranges/data.h"                  }
+      module drop_view              { header "__ranges/drop_view.h"             }
       module empty                  { header "__ranges/empty.h"                 }
       module empty_view             { header "__ranges/empty_view.h"            }
       module enable_borrowed_range  { header "__ranges/enable_borrowed_range.h" }
@@ -609,6 +614,7 @@ module std [system] {
       module ref_view               { header "__ranges/ref_view.h"              }
       module size                   { header "__ranges/size.h"                  }
       module subrange               { header "__ranges/subrange.h"              }
+      module transform_view         { header "__ranges/transform_view.h"        }
       module view_interface         { header "__ranges/view_interface.h"        }
     }
   }
@@ -635,6 +641,15 @@ module std [system] {
     export initializer_list
     export *
   }
+  module shared_mutex {
+    header "shared_mutex"
+    export version
+  }
+  module span {
+    header "span"
+    export ranges.__ranges.enable_borrowed_range
+    export version
+  }
   module sstream {
     header "sstream"
     // FIXME: should re-export istream, ostream, ios, streambuf, string?
index 91ea226..cfa0857 100644 (file)
@@ -14,7 +14,7 @@
 
 // ADDITIONAL_COMPILE_FLAGS: -Wno-self-assign-overloaded
 
-#include <__ranges/copyable_box.h>
+#include <ranges>
 
 #include <cassert>
 #include <type_traits>
index decbf04..9018e72 100644 (file)
@@ -13,7 +13,7 @@
 // template<class ...Args>
 // explicit <copyable-box>::<copyable-box>(in_place_t, Args&& ...args);
 
-#include <__ranges/copyable_box.h>
+#include <ranges>
 
 #include <cassert>
 #include <type_traits>
index 4582eff..261bef2 100644 (file)
@@ -13,7 +13,7 @@
 // T& <copyable-box>::operator*()
 // T const& <copyable-box>::operator*() const
 
-#include <__ranges/copyable_box.h>
+#include <ranges>
 
 #include <cassert>
 #include <type_traits>
index e1bd628..705309d 100644 (file)
@@ -12,7 +12,7 @@
 
 // bool <copyable-box>::__has_value() const
 
-#include <__ranges/copyable_box.h>
+#include <ranges>
 
 #include <cassert>
 #include <type_traits>
index 4b094a7..b8b5537 100644 (file)
@@ -12,7 +12,7 @@
 
 // This test ensures that <copyable-box> behaves correctly when it holds an empty type.
 
-#include <__ranges/copyable_box.h>
+#include <ranges>
 
 #include <cassert>
 #include <utility>
index b51196c..9f48dc4 100644 (file)
@@ -19,6 +19,8 @@
 
 #include <span>
 
+#include <cstddef>
+
 #include "test_macros.h"
 
 constexpr int carr[] = {1, 2, 3, 4};
index 0ab1179..0a68dd0 100644 (file)
@@ -19,6 +19,8 @@
 
 #include <span>
 
+#include <cstddef>
+
 #include "test_macros.h"
 
 constexpr int carr[] = {1, 2, 3, 4};
index 11b7136..96c403e 100644 (file)
@@ -21,6 +21,8 @@
 
 #include <span>
 
+#include <cstddef>
+
 #include "test_macros.h"
 
 constexpr int carr[] = {1, 2, 3, 4};