Skip to content

Commit 1314e87

Browse files
authored
[libc++] Add missing headers to the modulemap (#71127)
I don't know when, but at some point we lost test coverage to ensue that all the headers are in the modulemap. This adds a test to make sure all the headers (excluding a few which shouldn't be part of the modulemap) are at least mentioned. This also fixes a few headers which bit-rotted while we were missing the coverage.
1 parent f0b5527 commit 1314e87

File tree

16 files changed

+139
-26
lines changed

16 files changed

+139
-26
lines changed

libcxx/include/__algorithm/pstl_move.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#define _LIBCPP___ALGORITHM_PSTL_MOVE_H
1111

1212
#include <__algorithm/copy_n.h>
13+
#include <__algorithm/pstl_backend.h>
1314
#include <__algorithm/pstl_frontend_dispatch.h>
1415
#include <__algorithm/pstl_transform.h>
1516
#include <__config>

libcxx/include/__algorithm/pstl_rotate_copy.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <__algorithm/pstl_copy.h>
1414
#include <__algorithm/pstl_frontend_dispatch.h>
1515
#include <__type_traits/is_execution_policy.h>
16+
#include <optional>
1617

1718
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
1819
# pragma GCC system_header

libcxx/include/experimental/__simd/abi_tag.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
#ifndef _LIBCPP_EXPERIMENTAL___SIMD_ABI_TAG_H
1111
#define _LIBCPP_EXPERIMENTAL___SIMD_ABI_TAG_H
1212

13-
#include <experimental/__simd/scalar.h>
14-
#include <experimental/__simd/vec_ext.h>
13+
#include <cstddef>
14+
#include <experimental/__config>
15+
#include <experimental/__simd/internal_declaration.h>
1516

1617
#if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL)
1718

libcxx/include/experimental/__simd/aligned_tag.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212

1313
#include <__bit/bit_ceil.h>
1414
#include <__memory/assume_aligned.h>
15-
#include <cstdint>
15+
#include <cstddef>
16+
#include <experimental/__config>
1617

1718
#if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL)
1819

libcxx/include/experimental/__simd/declaration.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
#ifndef _LIBCPP_EXPERIMENTAL___SIMD_DECLARATION_H
1111
#define _LIBCPP_EXPERIMENTAL___SIMD_DECLARATION_H
1212

13+
#include <experimental/__config>
14+
#include <experimental/__simd/abi_tag.h>
15+
1316
#if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL)
1417

1518
_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL

libcxx/include/experimental/__simd/internal_declaration.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,17 @@
1010
#ifndef _LIBCPP_EXPERIMENTAL___SIMD_INTERNAL_DECLARATION_H
1111
#define _LIBCPP_EXPERIMENTAL___SIMD_INTERNAL_DECLARATION_H
1212

13+
#include <experimental/__config>
14+
1315
#if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL)
1416

1517
_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL
1618
inline namespace parallelism_v2 {
19+
namespace simd_abi {
20+
template <int>
21+
struct __vec_ext;
22+
struct __scalar;
23+
} // namespace simd_abi
1724

1825
template <class _Tp, class _Abi>
1926
struct __simd_storage;

libcxx/include/experimental/__simd/reference.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
#define _LIBCPP_EXPERIMENTAL___SIMD_REFERENCE_H
1212

1313
#include <__type_traits/is_assignable.h>
14+
#include <__type_traits/is_same.h>
15+
#include <__utility/forward.h>
16+
#include <cstddef>
17+
#include <experimental/__config>
1418
#include <experimental/__simd/utility.h>
1519

1620
#if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL)

libcxx/include/experimental/__simd/scalar.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
#define _LIBCPP_EXPERIMENTAL___SIMD_SCALAR_H
1212

1313
#include <cstddef>
14+
#include <experimental/__config>
1415
#include <experimental/__simd/internal_declaration.h>
16+
#include <experimental/__simd/traits.h>
1517

1618
#if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL)
1719

@@ -23,6 +25,9 @@ struct __scalar {
2325
};
2426
} // namespace simd_abi
2527

28+
template <>
29+
inline constexpr bool is_abi_tag_v<simd_abi::__scalar> = true;
30+
2631
template <class _Tp>
2732
struct __simd_storage<_Tp, simd_abi::__scalar> {
2833
_Tp __data;

libcxx/include/experimental/__simd/simd.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@
1010
#ifndef _LIBCPP_EXPERIMENTAL___SIMD_SIMD_H
1111
#define _LIBCPP_EXPERIMENTAL___SIMD_SIMD_H
1212

13+
#include <__type_traits/is_same.h>
1314
#include <__type_traits/remove_cvref.h>
15+
#include <__utility/forward.h>
16+
#include <cstddef>
17+
#include <experimental/__config>
1418
#include <experimental/__simd/abi_tag.h>
1519
#include <experimental/__simd/declaration.h>
20+
#include <experimental/__simd/internal_declaration.h>
1621
#include <experimental/__simd/reference.h>
17-
#include <experimental/__simd/scalar.h>
1822
#include <experimental/__simd/traits.h>
19-
#include <experimental/__simd/vec_ext.h>
23+
#include <experimental/__simd/utility.h>
2024

2125
#if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL)
2226

@@ -67,6 +71,9 @@ class simd {
6771
_LIBCPP_HIDE_FROM_ABI value_type operator[](size_t __i) const noexcept { return __s_.__get(__i); }
6872
};
6973

74+
template <class _Tp, class _Abi>
75+
inline constexpr bool is_simd_v<simd<_Tp, _Abi>> = true;
76+
7077
template <class _Tp>
7178
using native_simd = simd<_Tp, simd_abi::native<_Tp>>;
7279

libcxx/include/experimental/__simd/simd_mask.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@
1010
#ifndef _LIBCPP_EXPERIMENTAL___SIMD_SIMD_MASK_H
1111
#define _LIBCPP_EXPERIMENTAL___SIMD_SIMD_MASK_H
1212

13+
#include <__type_traits/is_same.h>
14+
#include <cstddef>
15+
#include <experimental/__config>
1316
#include <experimental/__simd/abi_tag.h>
1417
#include <experimental/__simd/declaration.h>
18+
#include <experimental/__simd/internal_declaration.h>
1519
#include <experimental/__simd/reference.h>
16-
#include <experimental/__simd/scalar.h>
17-
#include <experimental/__simd/vec_ext.h>
20+
#include <experimental/__simd/traits.h>
1821

1922
#if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL)
2023

@@ -56,6 +59,9 @@ class simd_mask {
5659
_LIBCPP_HIDE_FROM_ABI value_type operator[](size_t __i) const noexcept { return __s_.__get(__i); }
5760
};
5861

62+
template <class _Tp, class _Abi>
63+
inline constexpr bool is_simd_mask_v<simd_mask<_Tp, _Abi>> = true;
64+
5965
template <class _Tp>
6066
using native_simd_mask = simd_mask<_Tp, simd_abi::native<_Tp>>;
6167

0 commit comments

Comments
 (0)