mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 22:00:10 +00:00
[libc++] Granularize <type_traits> includes in <iterator>
Reviewed By: Mordante, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D140621
This commit is contained in:
parent
9a97296dd5
commit
430b397f67
@ -16,6 +16,7 @@
|
||||
#include <__random/uniform_int_distribution.h>
|
||||
#include <__utility/forward.h>
|
||||
#include <__utility/move.h>
|
||||
#include <__utility/swap.h>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
|
@ -26,9 +26,12 @@
|
||||
#include <__iterator/iterator_traits.h>
|
||||
#include <__memory/destruct_n.h>
|
||||
#include <__memory/unique_ptr.h>
|
||||
#include <__type_traits/conditional.h>
|
||||
#include <__type_traits/is_arithmetic.h>
|
||||
#include <__utility/move.h>
|
||||
#include <__utility/pair.h>
|
||||
#include <climits>
|
||||
#include <cstdint>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
@ -12,8 +12,8 @@
|
||||
|
||||
#include <__assert>
|
||||
#include <__config>
|
||||
#include <__type_traits/is_constant_evaluated.h>
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
@ -14,8 +14,9 @@
|
||||
#include <__config>
|
||||
#include <__iterator/iterator_traits.h>
|
||||
#include <__memory/pointer_traits.h>
|
||||
#include <__type_traits/enable_if.h>
|
||||
#include <__type_traits/is_convertible.h>
|
||||
#include <__utility/move.h>
|
||||
#include <type_traits>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
@ -25,6 +25,8 @@
|
||||
#include <__iterator/iter_swap.h>
|
||||
#include <__iterator/iterator_traits.h>
|
||||
#include <__iterator/readable_traits.h>
|
||||
#include <__type_traits/is_pointer.h>
|
||||
#include <__utility/declval.h>
|
||||
#include <variant>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
|
@ -25,9 +25,10 @@
|
||||
#include <__iterator/iterator_traits.h>
|
||||
#include <__iterator/readable_traits.h>
|
||||
#include <__memory/pointer_traits.h>
|
||||
#include <__type_traits/add_pointer.h>
|
||||
#include <__type_traits/conditional.h>
|
||||
#include <__utility/move.h>
|
||||
#include <compare>
|
||||
#include <type_traits>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
@ -24,8 +24,12 @@
|
||||
#include <__iterator/iterator_traits.h>
|
||||
#include <__iterator/move_sentinel.h>
|
||||
#include <__iterator/readable_traits.h>
|
||||
#include <__type_traits/conditional.h>
|
||||
#include <__type_traits/is_assignable.h>
|
||||
#include <__type_traits/is_constructible.h>
|
||||
#include <__type_traits/is_same.h>
|
||||
#include <__utility/declval.h>
|
||||
#include <__utility/move.h>
|
||||
#include <type_traits>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <__config>
|
||||
#include <__iterator/concepts.h>
|
||||
#include <__iterator/incrementable_traits.h>
|
||||
#include <type_traits>
|
||||
#include <__type_traits/remove_cvref.h>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
@ -11,8 +11,9 @@
|
||||
#define _LIBCPP___ITERATOR_SIZE_H
|
||||
|
||||
#include <__config>
|
||||
#include <__type_traits/common_type.h>
|
||||
#include <__type_traits/make_signed.h>
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
@ -15,7 +15,8 @@
|
||||
#include <__iterator/iterator_traits.h>
|
||||
#include <__memory/addressof.h>
|
||||
#include <__memory/pointer_traits.h>
|
||||
#include <type_traits>
|
||||
#include <__type_traits/enable_if.h>
|
||||
#include <__type_traits/is_convertible.h>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
@ -14,6 +14,8 @@
|
||||
#include <__memory/uses_allocator.h>
|
||||
#include <__type_traits/enable_if.h>
|
||||
#include <__type_traits/is_same.h>
|
||||
#include <__type_traits/remove_cv.h>
|
||||
#include <__utility/declval.h>
|
||||
#include <__utility/pair.h>
|
||||
#include <tuple>
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <__assert>
|
||||
#include <__config>
|
||||
#include <__debug>
|
||||
#include <__functional/invoke.h>
|
||||
#include <__iterator/distance.h>
|
||||
#include <__iterator/iterator_traits.h>
|
||||
#include <__iterator/next.h>
|
||||
@ -23,6 +24,17 @@
|
||||
#include <__memory/swap_allocator.h>
|
||||
#include <__memory/unique_ptr.h>
|
||||
#include <__type_traits/can_extract_key.h>
|
||||
#include <__type_traits/conditional.h>
|
||||
#include <__type_traits/is_const.h>
|
||||
#include <__type_traits/is_nothrow_copy_constructible.h>
|
||||
#include <__type_traits/is_nothrow_default_constructible.h>
|
||||
#include <__type_traits/is_nothrow_move_assignable.h>
|
||||
#include <__type_traits/is_nothrow_move_constructible.h>
|
||||
#include <__type_traits/is_pointer.h>
|
||||
#include <__type_traits/is_same.h>
|
||||
#include <__type_traits/is_swappable.h>
|
||||
#include <__type_traits/remove_const_ref.h>
|
||||
#include <__type_traits/remove_cvref.h>
|
||||
#include <__utility/forward.h>
|
||||
#include <__utility/move.h>
|
||||
#include <__utility/pair.h>
|
||||
|
@ -54,6 +54,7 @@ namespace std {
|
||||
|
||||
#include <__assert> // all public C++ headers provide the assertion handler
|
||||
#include <__memory/addressof.h>
|
||||
#include <__type_traits/decay.h>
|
||||
#include <__utility/forward.h>
|
||||
#include <__utility/move.h>
|
||||
#include <experimental/__config>
|
||||
|
@ -1757,6 +1757,7 @@ _LIBCPP_POP_MACROS
|
||||
# include <limits>
|
||||
# include <new>
|
||||
# include <stdexcept>
|
||||
# include <type_traits>
|
||||
#endif
|
||||
|
||||
#endif // _LIBCPP_FSTREAM
|
||||
|
@ -719,7 +719,6 @@ template <class E> constexpr const E* data(initializer_list<E> il) noexcept;
|
||||
#include <__memory/pointer_traits.h>
|
||||
#include <cstddef>
|
||||
#include <initializer_list>
|
||||
#include <type_traits>
|
||||
#include <version>
|
||||
|
||||
// standard-mandated includes
|
||||
@ -735,6 +734,7 @@ template <class E> constexpr const E* data(initializer_list<E> il) noexcept;
|
||||
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
|
||||
# include <exception>
|
||||
# include <new>
|
||||
# include <type_traits>
|
||||
# include <typeinfo>
|
||||
# include <utility>
|
||||
#endif
|
||||
|
@ -4369,6 +4369,7 @@ _LIBCPP_POP_MACROS
|
||||
# include <cstdarg>
|
||||
# include <iterator>
|
||||
# include <stdexcept>
|
||||
# include <type_traits>
|
||||
# include <typeinfo>
|
||||
#endif
|
||||
|
||||
|
@ -892,7 +892,10 @@ module std [system] {
|
||||
module hash { private header "__functional/hash.h" }
|
||||
module hash_fwd { private header "__fwd/hash.h" }
|
||||
module identity { private header "__functional/identity.h" }
|
||||
module invoke { private header "__functional/invoke.h" }
|
||||
module invoke {
|
||||
private header "__functional/invoke.h"
|
||||
export type_traits
|
||||
}
|
||||
module is_transparent { private header "__functional/is_transparent.h" }
|
||||
module mem_fn { private header "__functional/mem_fn.h" }
|
||||
module mem_fun_ref { private header "__functional/mem_fun_ref.h" }
|
||||
@ -1408,7 +1411,10 @@ module std [system] {
|
||||
module is_convertible { private header "__type_traits/is_convertible.h" }
|
||||
module is_copy_assignable { private header "__type_traits/is_copy_assignable.h" }
|
||||
module is_copy_constructible { private header "__type_traits/is_copy_constructible.h" }
|
||||
module is_core_convertible { private header "__type_traits/is_core_convertible.h" }
|
||||
module is_core_convertible {
|
||||
private header "__type_traits/is_core_convertible.h"
|
||||
export integral_constant
|
||||
}
|
||||
module is_default_constructible { private header "__type_traits/is_default_constructible.h" }
|
||||
module is_destructible { private header "__type_traits/is_destructible.h" }
|
||||
module is_empty { private header "__type_traits/is_empty.h" }
|
||||
@ -1469,7 +1475,10 @@ module std [system] {
|
||||
module is_unsigned { private header "__type_traits/is_unsigned.h" }
|
||||
module is_unsigned_integer { private header "__type_traits/is_unsigned_integer.h" }
|
||||
module is_valid_expansion { private header "__type_traits/is_valid_expansion.h" }
|
||||
module is_void { private header "__type_traits/is_void.h" }
|
||||
module is_void {
|
||||
private header "__type_traits/is_void.h"
|
||||
export integral_constant
|
||||
}
|
||||
module is_volatile { private header "__type_traits/is_volatile.h" }
|
||||
module lazy { private header "__type_traits/lazy.h" }
|
||||
module make_32_64_or_128_bit { private header "__type_traits/make_32_64_or_128_bit.h" }
|
||||
|
@ -118,6 +118,7 @@ template <class OuterA1, class OuterA2, class... InnerAllocs>
|
||||
#include <__type_traits/integral_constant.h>
|
||||
#include <__type_traits/is_constructible.h>
|
||||
#include <__type_traits/remove_reference.h>
|
||||
#include <__utility/declval.h>
|
||||
#include <__utility/forward.h>
|
||||
#include <__utility/move.h>
|
||||
#include <__utility/pair.h>
|
||||
|
@ -205,11 +205,45 @@ template <class... Types>
|
||||
#include <__compare/common_comparison_category.h>
|
||||
#include <__compare/synth_three_way.h>
|
||||
#include <__config>
|
||||
#include <__functional/invoke.h>
|
||||
#include <__functional/unwrap_ref.h>
|
||||
#include <__fwd/array.h>
|
||||
#include <__memory/allocator_arg_t.h>
|
||||
#include <__memory/uses_allocator.h>
|
||||
#include <__type_traits/apply_cv.h>
|
||||
#include <__type_traits/common_reference.h>
|
||||
#include <__type_traits/common_type.h>
|
||||
#include <__type_traits/conditional.h>
|
||||
#include <__type_traits/conjunction.h>
|
||||
#include <__type_traits/copy_cvref.h>
|
||||
#include <__type_traits/disjunction.h>
|
||||
#include <__type_traits/is_arithmetic.h>
|
||||
#include <__type_traits/is_assignable.h>
|
||||
#include <__type_traits/is_constructible.h>
|
||||
#include <__type_traits/is_convertible.h>
|
||||
#include <__type_traits/is_copy_assignable.h>
|
||||
#include <__type_traits/is_copy_constructible.h>
|
||||
#include <__type_traits/is_default_constructible.h>
|
||||
#include <__type_traits/is_empty.h>
|
||||
#include <__type_traits/is_final.h>
|
||||
#include <__type_traits/is_implicitly_default_constructible.h>
|
||||
#include <__type_traits/is_move_assignable.h>
|
||||
#include <__type_traits/is_move_constructible.h>
|
||||
#include <__type_traits/is_nothrow_assignable.h>
|
||||
#include <__type_traits/is_nothrow_constructible.h>
|
||||
#include <__type_traits/is_nothrow_copy_assignable.h>
|
||||
#include <__type_traits/is_nothrow_copy_constructible.h>
|
||||
#include <__type_traits/is_nothrow_default_constructible.h>
|
||||
#include <__type_traits/is_nothrow_move_assignable.h>
|
||||
#include <__type_traits/is_reference.h>
|
||||
#include <__type_traits/is_same.h>
|
||||
#include <__type_traits/is_swappable.h>
|
||||
#include <__type_traits/lazy.h>
|
||||
#include <__type_traits/maybe_const.h>
|
||||
#include <__type_traits/nat.h>
|
||||
#include <__type_traits/negation.h>
|
||||
#include <__type_traits/remove_cvref.h>
|
||||
#include <__type_traits/remove_reference.h>
|
||||
#include <__utility/forward.h>
|
||||
#include <__utility/integer_sequence.h>
|
||||
#include <__utility/move.h>
|
||||
@ -217,7 +251,6 @@ template <class... Types>
|
||||
#include <__utility/piecewise_construct.h>
|
||||
#include <__utility/swap.h>
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#include <version>
|
||||
|
||||
// standard-mandated includes
|
||||
@ -1822,6 +1855,7 @@ _LIBCPP_END_NAMESPACE_STD
|
||||
# include <exception>
|
||||
# include <iosfwd>
|
||||
# include <new>
|
||||
# include <type_traits>
|
||||
# include <typeinfo>
|
||||
# include <utility>
|
||||
#endif
|
||||
|
@ -211,9 +211,26 @@ namespace std {
|
||||
#include <__compare/three_way_comparable.h>
|
||||
#include <__config>
|
||||
#include <__functional/hash.h>
|
||||
#include <__functional/invoke.h>
|
||||
#include <__functional/operations.h>
|
||||
#include <__functional/unary_function.h>
|
||||
#include <__type_traits/add_const.h>
|
||||
#include <__type_traits/add_cv.h>
|
||||
#include <__type_traits/add_pointer.h>
|
||||
#include <__type_traits/add_volatile.h>
|
||||
#include <__type_traits/dependent_type.h>
|
||||
#include <__type_traits/is_array.h>
|
||||
#include <__type_traits/is_destructible.h>
|
||||
#include <__type_traits/is_nothrow_move_constructible.h>
|
||||
#include <__type_traits/is_trivially_copy_assignable.h>
|
||||
#include <__type_traits/is_trivially_copy_constructible.h>
|
||||
#include <__type_traits/is_trivially_destructible.h>
|
||||
#include <__type_traits/is_trivially_move_assignable.h>
|
||||
#include <__type_traits/is_trivially_move_constructible.h>
|
||||
#include <__type_traits/is_void.h>
|
||||
#include <__type_traits/remove_const.h>
|
||||
#include <__type_traits/type_identity.h>
|
||||
#include <__type_traits/void_t.h>
|
||||
#include <__utility/forward.h>
|
||||
#include <__utility/in_place.h>
|
||||
#include <__utility/move.h>
|
||||
@ -224,7 +241,6 @@ namespace std {
|
||||
#include <limits>
|
||||
#include <new>
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
#include <version>
|
||||
|
||||
// standard-mandated includes
|
||||
@ -1815,6 +1831,7 @@ _LIBCPP_END_NAMESPACE_STD
|
||||
_LIBCPP_POP_MACROS
|
||||
|
||||
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
|
||||
# include <type_traits>
|
||||
# include <typeinfo>
|
||||
# include <utility>
|
||||
#endif
|
||||
|
@ -19,9 +19,13 @@
|
||||
// random_access_iterator_tag.
|
||||
// (1.4) -- Otherwise, ITER_CONCEPT(I) does not denote a type.
|
||||
|
||||
// ADDITIONAL_COMPILE_FLAGS: -Wno-private-header
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
#include <__type_traits/is_valid_expansion.h>
|
||||
#include <iterator>
|
||||
|
||||
struct OtherTag : std::input_iterator_tag {};
|
||||
struct OtherTagTwo : std::output_iterator_tag {};
|
||||
|
||||
|
@ -305,7 +305,6 @@ fstream istream
|
||||
fstream mutex
|
||||
fstream ostream
|
||||
fstream string
|
||||
fstream type_traits
|
||||
fstream typeinfo
|
||||
fstream version
|
||||
functional array
|
||||
@ -367,7 +366,6 @@ iterator cstdlib
|
||||
iterator initializer_list
|
||||
iterator iosfwd
|
||||
iterator limits
|
||||
iterator type_traits
|
||||
iterator variant
|
||||
iterator version
|
||||
latch atomic
|
||||
@ -401,7 +399,6 @@ locale mutex
|
||||
locale new
|
||||
locale streambuf
|
||||
locale string
|
||||
locale type_traits
|
||||
locale version
|
||||
map compare
|
||||
map cstddef
|
||||
@ -655,7 +652,6 @@ thread type_traits
|
||||
thread version
|
||||
tuple compare
|
||||
tuple cstddef
|
||||
tuple type_traits
|
||||
tuple version
|
||||
type_traits cstddef
|
||||
type_traits cstdint
|
||||
@ -721,7 +717,6 @@ variant initializer_list
|
||||
variant limits
|
||||
variant new
|
||||
variant tuple
|
||||
variant type_traits
|
||||
variant version
|
||||
vector climits
|
||||
vector compare
|
||||
|
|
@ -11,9 +11,9 @@
|
||||
// template<class In>
|
||||
// concept indirectly_readable;
|
||||
|
||||
#include <iterator>
|
||||
|
||||
#include <concepts>
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
|
||||
#include "read_write.h"
|
||||
|
||||
|
@ -10,9 +10,9 @@
|
||||
|
||||
// iter_common_reference_t
|
||||
|
||||
#include <iterator>
|
||||
|
||||
#include <concepts>
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
|
||||
struct X { };
|
||||
|
||||
|
@ -12,10 +12,9 @@
|
||||
// requires convertible_to<const I2&, I> && convertible_to<const S2&, S>
|
||||
// constexpr common_iterator(const common_iterator<I2, S2>& x);
|
||||
|
||||
#include <iterator>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
|
||||
constexpr bool test()
|
||||
{
|
||||
|
@ -16,9 +16,10 @@
|
||||
// requires assignable_from<S&, const S2&>
|
||||
// constexpr move_sentinel& operator=(const move_sentinel<S2>& s);
|
||||
|
||||
#include <iterator>
|
||||
#include <cassert>
|
||||
#include <concepts>
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
|
||||
struct NonAssignable {
|
||||
NonAssignable& operator=(int i);
|
||||
|
@ -16,9 +16,10 @@
|
||||
// requires convertible_to<const S2&, S>
|
||||
// constexpr move_sentinel(const move_sentinel<S2>& s);
|
||||
|
||||
#include <iterator>
|
||||
#include <cassert>
|
||||
#include <concepts>
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
|
||||
struct NonConvertible {
|
||||
explicit NonConvertible();
|
||||
|
@ -14,8 +14,9 @@
|
||||
|
||||
// constexpr explicit move_sentinel(S s);
|
||||
|
||||
#include <iterator>
|
||||
#include <cassert>
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
|
||||
constexpr bool test()
|
||||
{
|
||||
|
@ -21,6 +21,7 @@ TEST_MSVC_DIAGNOSTIC_IGNORED(4242 4244) // Various truncation warnings
|
||||
#include <compare>
|
||||
#include <limits> // quiet_NaN
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
#include <utility> // declval
|
||||
|
||||
template <typename T, typename U = T>
|
||||
|
@ -12,8 +12,9 @@
|
||||
|
||||
// UNSUPPORTED: c++03
|
||||
|
||||
#include <tuple>
|
||||
#include <cassert>
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
|
@ -17,9 +17,10 @@
|
||||
//
|
||||
// See https://llvm.org/PR22806.
|
||||
|
||||
#include <tuple>
|
||||
#include <memory>
|
||||
#include <cassert>
|
||||
#include <memory>
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
|
@ -9,14 +9,14 @@
|
||||
#ifndef MIN_ALLOCATOR_H
|
||||
#define MIN_ALLOCATOR_H
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
#include <cstddef>
|
||||
#include <cassert>
|
||||
#include <climits>
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
#include <iterator>
|
||||
#include <memory>
|
||||
#include <new>
|
||||
#include <type_traits>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user