[libcxx-commits] [libcxx] 5ac0c1a - [libc++][PSTL] Add missing includes to PSTL headers
Ian Anderson via libcxx-commits
libcxx-commits at lists.llvm.org
Wed May 10 15:45:18 PDT 2023
Author: Ian Anderson
Date: 2023-05-10T15:45:12-07:00
New Revision: 5ac0c1af8215ae5b084235c34be60a50dbe4e92e
URL: https://github.com/llvm/llvm-project/commit/5ac0c1af8215ae5b084235c34be60a50dbe4e92e
DIFF: https://github.com/llvm/llvm-project/commit/5ac0c1af8215ae5b084235c34be60a50dbe4e92e.diff
LOG: [libc++][PSTL] Add missing includes to PSTL headers
Several PSTL headers included by <algorithm> are missing includes for things they use.
Switch some quoted includes to angle includes.
(Issues found from running `check-cxx` with https://reviews.llvm.org/D144322)
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D150085
Added:
Modified:
libcxx/include/__algorithm/pstl_any_all_none_of.h
libcxx/include/__algorithm/pstl_fill.h
libcxx/include/__algorithm/pstl_find.h
libcxx/include/__algorithm/pstl_for_each.h
libcxx/include/__pstl/internal/execution_impl.h
libcxx/include/__pstl/internal/parallel_backend_serial.h
libcxx/include/__pstl/internal/parallel_impl.h
libcxx/include/__pstl/internal/unseq_backend_simd.h
Removed:
################################################################################
diff --git a/libcxx/include/__algorithm/pstl_any_all_none_of.h b/libcxx/include/__algorithm/pstl_any_all_none_of.h
index 49bae753a4bf4..4ca4deb5652d4 100644
--- a/libcxx/include/__algorithm/pstl_any_all_none_of.h
+++ b/libcxx/include/__algorithm/pstl_any_all_none_of.h
@@ -12,6 +12,7 @@
#include <__algorithm/any_of.h>
#include <__config>
#include <__iterator/iterator_traits.h>
+#include <__pstl/internal/execution_impl.h>
#include <__pstl/internal/parallel_impl.h>
#include <__pstl/internal/unseq_backend_simd.h>
#include <__type_traits/enable_if.h>
diff --git a/libcxx/include/__algorithm/pstl_fill.h b/libcxx/include/__algorithm/pstl_fill.h
index c2771b29e1c2e..5e6128528fb47 100644
--- a/libcxx/include/__algorithm/pstl_fill.h
+++ b/libcxx/include/__algorithm/pstl_fill.h
@@ -12,8 +12,12 @@
#include <__algorithm/fill.h>
#include <__config>
#include <__iterator/iterator_traits.h>
+#include <__pstl/internal/execution_impl.h>
+#include <__pstl/internal/parallel_backend.h>
+#include <__pstl/internal/parallel_backend_serial.h>
#include <__pstl/internal/parallel_impl.h>
#include <__pstl/internal/unseq_backend_simd.h>
+#include <__type_traits/enable_if.h>
#include <__type_traits/is_execution_policy.h>
#include <__type_traits/remove_cvref.h>
#include <__utility/terminate_on_exception.h>
diff --git a/libcxx/include/__algorithm/pstl_find.h b/libcxx/include/__algorithm/pstl_find.h
index be53ee29d5f20..bd268260e0b9e 100644
--- a/libcxx/include/__algorithm/pstl_find.h
+++ b/libcxx/include/__algorithm/pstl_find.h
@@ -12,8 +12,12 @@
#include <__algorithm/comp.h>
#include <__algorithm/find.h>
#include <__config>
+#include <__functional/operations.h>
+#include <__iterator/iterator_traits.h>
+#include <__pstl/internal/execution_impl.h>
#include <__pstl/internal/parallel_impl.h>
#include <__pstl/internal/unseq_backend_simd.h>
+#include <__type_traits/enable_if.h>
#include <__type_traits/is_execution_policy.h>
#include <__type_traits/remove_cvref.h>
#include <__utility/terminate_on_exception.h>
diff --git a/libcxx/include/__algorithm/pstl_for_each.h b/libcxx/include/__algorithm/pstl_for_each.h
index 08fd4b887460b..339e7268f82e6 100644
--- a/libcxx/include/__algorithm/pstl_for_each.h
+++ b/libcxx/include/__algorithm/pstl_for_each.h
@@ -14,7 +14,9 @@
#include <__config>
#include <__iterator/iterator_traits.h>
#include <__pstl/internal/parallel_backend.h>
+#include <__pstl/internal/parallel_backend_serial.h>
#include <__pstl/internal/unseq_backend_simd.h>
+#include <__type_traits/enable_if.h>
#include <__type_traits/is_execution_policy.h>
#include <__type_traits/remove_cvref.h>
#include <__utility/terminate_on_exception.h>
diff --git a/libcxx/include/__pstl/internal/execution_impl.h b/libcxx/include/__pstl/internal/execution_impl.h
index 7a1aea560338c..c3a7405d393f1 100644
--- a/libcxx/include/__pstl/internal/execution_impl.h
+++ b/libcxx/include/__pstl/internal/execution_impl.h
@@ -14,9 +14,11 @@
#include <__iterator/iterator_traits.h>
#include <__type_traits/conditional.h>
#include <__type_traits/conjunction.h>
+#include <__type_traits/decay.h>
+#include <__type_traits/integral_constant.h>
#include <__type_traits/is_base_of.h>
-#include "execution_defs.h"
+#include <__pstl/internal/execution_defs.h>
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__pstl/internal/parallel_backend_serial.h b/libcxx/include/__pstl/internal/parallel_backend_serial.h
index 8d12451cd9e6d..4733899ce7625 100644
--- a/libcxx/include/__pstl/internal/parallel_backend_serial.h
+++ b/libcxx/include/__pstl/internal/parallel_backend_serial.h
@@ -14,6 +14,7 @@
#include <__memory/allocator.h>
#include <__pstl/internal/execution_impl.h>
#include <__utility/forward.h>
+#include <cstddef>
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__pstl/internal/parallel_impl.h b/libcxx/include/__pstl/internal/parallel_impl.h
index c0e9545d9222a..740f1376a8f47 100644
--- a/libcxx/include/__pstl/internal/parallel_impl.h
+++ b/libcxx/include/__pstl/internal/parallel_impl.h
@@ -13,7 +13,10 @@
#include <__atomic/atomic.h>
#include <__atomic/memory_order.h>
#include <__config>
+#include <__iterator/iterator_traits.h>
#include <__pstl/internal/parallel_backend.h>
+#include <__pstl/internal/parallel_backend_serial.h>
+#include <__utility/forward.h>
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/__pstl/internal/unseq_backend_simd.h b/libcxx/include/__pstl/internal/unseq_backend_simd.h
index 9485805159573..b4a7f641cb106 100644
--- a/libcxx/include/__pstl/internal/unseq_backend_simd.h
+++ b/libcxx/include/__pstl/internal/unseq_backend_simd.h
@@ -12,12 +12,15 @@
#include <__config>
#include <__functional/operations.h>
+#include <__iterator/iterator_traits.h>
#include <__type_traits/is_arithmetic.h>
+#include <__type_traits/is_same.h>
+#include <__utility/move.h>
#include <__utility/pair.h>
#include <cstddef>
#include <cstdint>
-#include "utils.h"
+#include <__pstl/internal/utils.h>
// This header defines the minimum set of vector routines required
// to support parallel STL.
More information about the libcxx-commits
mailing list