[libcxx-commits] [libcxx] 040f50a - [NFC][libc++] Moves transitive includes location.

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 12 11:35:19 PDT 2022


Author: Mark de Wever
Date: 2022-10-12T20:35:09+02:00
New Revision: 040f50ad6badcdbbb603bad92d3abefffaef7114

URL: https://github.com/llvm/llvm-project/commit/040f50ad6badcdbbb603bad92d3abefffaef7114
DIFF: https://github.com/llvm/llvm-project/commit/040f50ad6badcdbbb603bad92d3abefffaef7114.diff

LOG: [NFC][libc++] Moves transitive includes location.

This moves some includes missed in D133212.

Reviewed By: ldionne, #libc, philnik

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

Added: 
    

Modified: 
    libcxx/include/barrier
    libcxx/include/experimental/memory_resource
    libcxx/include/scoped_allocator

Removed: 
    


################################################################################
diff  --git a/libcxx/include/barrier b/libcxx/include/barrier
index 836a0031d31cc..a2f753677b55b 100644
--- a/libcxx/include/barrier
+++ b/libcxx/include/barrier
@@ -54,14 +54,6 @@ namespace std
 #include <atomic>
 #include <limits>
 
-#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
-#  include <concepts>
-#  include <iterator>
-#  include <memory>
-#  include <stdexcept>
-#  include <variant>
-#endif
-
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
@@ -336,4 +328,12 @@ _LIBCPP_END_NAMESPACE_STD
 
 _LIBCPP_POP_MACROS
 
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+#  include <concepts>
+#  include <iterator>
+#  include <memory>
+#  include <stdexcept>
+#  include <variant>
+#endif
+
 #endif //_LIBCPP_BARRIER

diff  --git a/libcxx/include/experimental/memory_resource b/libcxx/include/experimental/memory_resource
index 146e520c57c59..1b5fd39b3a562 100644
--- a/libcxx/include/experimental/memory_resource
+++ b/libcxx/include/experimental/memory_resource
@@ -77,18 +77,6 @@ namespace pmr {
 #include <tuple>
 #include <type_traits>
 
-#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
-#  include <atomic>
-#  include <climits>
-#  include <concepts>
-#  include <cstring>
-#  include <ctime>
-#  include <iterator>
-#  include <memory>
-#  include <ratio>
-#  include <variant>
-#endif
-
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
@@ -432,4 +420,16 @@ _LIBCPP_END_NAMESPACE_LFTS_PMR
 
 _LIBCPP_POP_MACROS
 
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+#  include <atomic>
+#  include <climits>
+#  include <concepts>
+#  include <cstring>
+#  include <ctime>
+#  include <iterator>
+#  include <memory>
+#  include <ratio>
+#  include <variant>
+#endif
+
 #endif /* _LIBCPP_EXPERIMENTAL_MEMORY_RESOURCE */

diff  --git a/libcxx/include/scoped_allocator b/libcxx/include/scoped_allocator
index 30a22ab7b4369..f89db7bb18c71 100644
--- a/libcxx/include/scoped_allocator
+++ b/libcxx/include/scoped_allocator
@@ -125,19 +125,6 @@ template <class OuterA1, class OuterA2, class... InnerAllocs>
 #include <tuple>
 #include <version>
 
-#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
-#  include <atomic>
-#  include <climits>
-#  include <concepts>
-#  include <cstring>
-#  include <ctime>
-#  include <iterator>
-#  include <memory>
-#  include <ratio>
-#  include <stdexcept>
-#  include <variant>
-#endif
-
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
@@ -728,4 +715,17 @@ operator!=(const scoped_allocator_adaptor<_OuterA1, _InnerAllocs...>& __a,
 
 _LIBCPP_END_NAMESPACE_STD
 
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+#  include <atomic>
+#  include <climits>
+#  include <concepts>
+#  include <cstring>
+#  include <ctime>
+#  include <iterator>
+#  include <memory>
+#  include <ratio>
+#  include <stdexcept>
+#  include <variant>
+#endif
+
 #endif // _LIBCPP_SCOPED_ALLOCATOR


        


More information about the libcxx-commits mailing list