[libc++] Granularize <exception> includes
Reviewed By: ldionne, #libc Spies: mikhail.ramalho, smeenai, libcxx-commits Differential Revision: https://reviews.llvm.org/D146097
This commit is contained in:
parent
5b1145bc46
commit
c9d36bd807
|
@ -10,10 +10,9 @@
|
|||
#define _LIBCPP___EXPECTED_BAD_EXPECTED_ACCESS_H
|
||||
|
||||
#include <__config>
|
||||
#include <__exception/exception.h>
|
||||
#include <__utility/move.h>
|
||||
|
||||
#include <exception>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
#endif
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <__iterator/incrementable_traits.h>
|
||||
#include <__iterator/iterator_traits.h>
|
||||
#include <__iterator/wrap_iter.h>
|
||||
#include <__memory/addressof.h>
|
||||
#include <__type_traits/add_pointer.h>
|
||||
#include <__utility/move.h>
|
||||
#include <cstddef>
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
#include <__assert>
|
||||
#include <__config>
|
||||
#include <__exception/exception.h>
|
||||
#include <__functional/binary_function.h>
|
||||
#include <__functional/invoke.h>
|
||||
#include <__functional/unary_function.h>
|
||||
|
@ -32,7 +33,6 @@
|
|||
#include <__utility/piecewise_construct.h>
|
||||
#include <__utility/swap.h>
|
||||
#include <__verbose_abort>
|
||||
#include <exception>
|
||||
#include <new>
|
||||
#include <tuple>
|
||||
#include <typeinfo>
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <__iterator/iterator_traits.h>
|
||||
#include <__iterator/iterator_with_data.h>
|
||||
#include <__iterator/segmented_iterator.h>
|
||||
#include <__memory/addressof.h>
|
||||
#include <__ranges/access.h>
|
||||
#include <__ranges/all.h>
|
||||
#include <__ranges/concepts.h>
|
||||
|
|
|
@ -543,7 +543,6 @@ POLICY: For non-variadic implementations, the number of arguments is limited
|
|||
#include <__functional/unary_negate.h>
|
||||
#include <__functional/unwrap_ref.h>
|
||||
#include <__utility/forward.h>
|
||||
#include <exception>
|
||||
#include <memory> // TODO: find out why removing this breaks the modules build
|
||||
#include <typeinfo>
|
||||
#include <version>
|
||||
|
@ -555,6 +554,7 @@ POLICY: For non-variadic implementations, the number of arguments is limited
|
|||
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
|
||||
# include <atomic>
|
||||
# include <concepts>
|
||||
# include <exception>
|
||||
# include <tuple>
|
||||
# include <type_traits>
|
||||
# include <utility>
|
||||
|
|
|
@ -366,6 +366,7 @@ template <class R, class Alloc> struct uses_allocator<packaged_task<R>, Alloc>;
|
|||
#include <__chrono/duration.h>
|
||||
#include <__chrono/time_point.h>
|
||||
#include <__config>
|
||||
#include <__exception/exception_ptr.h>
|
||||
#include <__memory/allocator_arg_t.h>
|
||||
#include <__memory/allocator_destructor.h>
|
||||
#include <__memory/shared_ptr.h>
|
||||
|
@ -377,8 +378,6 @@ template <class R, class Alloc> struct uses_allocator<packaged_task<R>, Alloc>;
|
|||
#include <__utility/auto_cast.h>
|
||||
#include <__utility/forward.h>
|
||||
#include <__utility/move.h>
|
||||
#include <__verbose_abort>
|
||||
#include <exception>
|
||||
#include <mutex>
|
||||
#include <new>
|
||||
#include <system_error>
|
||||
|
@ -2461,6 +2460,7 @@ _LIBCPP_END_NAMESPACE_STD
|
|||
|
||||
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
|
||||
# include <atomic>
|
||||
# include <exception>
|
||||
#endif
|
||||
|
||||
#endif // _LIBCPP_FUTURE
|
||||
|
|
|
@ -549,6 +549,7 @@ erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred); // C++20
|
|||
#include <__iterator/erase_if_container.h>
|
||||
#include <__iterator/iterator_traits.h>
|
||||
#include <__iterator/reverse_iterator.h>
|
||||
#include <__memory/addressof.h>
|
||||
#include <__memory/allocator.h>
|
||||
#include <__memory_resource/polymorphic_allocator.h>
|
||||
#include <__node_handle>
|
||||
|
|
|
@ -89,13 +89,14 @@ void operator delete[](void* ptr, void*) noexcept;
|
|||
#include <__assert> // all public C++ headers provide the assertion handler
|
||||
#include <__availability>
|
||||
#include <__config>
|
||||
#include <__exception/exception.h>
|
||||
#include <__type_traits/alignment_of.h>
|
||||
#include <__type_traits/is_function.h>
|
||||
#include <__type_traits/is_same.h>
|
||||
#include <__type_traits/remove_cv.h>
|
||||
#include <__verbose_abort>
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
#include <exception>
|
||||
#include <version>
|
||||
|
||||
#if defined(_LIBCPP_ABI_VCRUNTIME)
|
||||
|
@ -365,6 +366,7 @@ inline constexpr size_t hardware_constructive_interference_size = __GCC_CONSTRUC
|
|||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
|
||||
# include <exception>
|
||||
# include <type_traits>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -165,6 +165,7 @@ basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, cons
|
|||
|
||||
#include <__assert> // all public C++ headers provide the assertion handler
|
||||
#include <__config>
|
||||
#include <__exception/operations.h>
|
||||
#include <__memory/shared_ptr.h>
|
||||
#include <__memory/unique_ptr.h>
|
||||
#include <__type_traits/conjunction.h>
|
||||
|
|
|
@ -43,9 +43,8 @@ public:
|
|||
|
||||
#include <__assert> // all public C++ headers provide the assertion handler
|
||||
#include <__config>
|
||||
#include <__verbose_abort>
|
||||
#include <__exception/exception.h>
|
||||
#include <cstdlib>
|
||||
#include <exception>
|
||||
#include <iosfwd> // for string forward decl
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
|
@ -300,4 +299,8 @@ void __throw_underflow_error(const char*__msg)
|
|||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
|
||||
# include <exception>
|
||||
#endif
|
||||
|
||||
#endif // _LIBCPP_STDEXCEPT
|
||||
|
|
|
@ -85,7 +85,9 @@ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
|
|||
|
||||
#include <__assert> // all public C++ headers provide the assertion handler
|
||||
#include <__config>
|
||||
#include <__exception/terminate.h>
|
||||
#include <__functional/hash.h>
|
||||
#include <__memory/addressof.h>
|
||||
#include <__memory/unique_ptr.h>
|
||||
#include <__mutex_base>
|
||||
#include <__thread/poll_with_backoff.h>
|
||||
|
|
|
@ -59,12 +59,12 @@ public:
|
|||
#include <__assert> // all public C++ headers provide the assertion handler
|
||||
#include <__availability>
|
||||
#include <__config>
|
||||
#include <__exception/exception.h>
|
||||
#include <__type_traits/is_constant_evaluated.h>
|
||||
#include <__verbose_abort>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <exception>
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
||||
# pragma GCC system_header
|
||||
|
@ -415,6 +415,7 @@ void __throw_bad_cast()
|
|||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
|
||||
# include <exception>
|
||||
# include <type_traits>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -210,6 +210,7 @@ namespace std {
|
|||
#include <__compare/compare_three_way_result.h>
|
||||
#include <__compare/three_way_comparable.h>
|
||||
#include <__config>
|
||||
#include <__exception/exception.h>
|
||||
#include <__functional/hash.h>
|
||||
#include <__functional/invoke.h>
|
||||
#include <__functional/operations.h>
|
||||
|
@ -239,7 +240,6 @@ namespace std {
|
|||
#include <__utility/swap.h>
|
||||
#include <__variant/monostate.h>
|
||||
#include <__verbose_abort>
|
||||
#include <exception>
|
||||
#include <initializer_list>
|
||||
#include <limits>
|
||||
#include <new>
|
||||
|
@ -1834,6 +1834,7 @@ _LIBCPP_END_NAMESPACE_STD
|
|||
_LIBCPP_POP_MACROS
|
||||
|
||||
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
|
||||
# include <exception>
|
||||
# include <type_traits>
|
||||
# include <typeinfo>
|
||||
# include <utility>
|
||||
|
|
|
@ -213,7 +213,6 @@ exception version
|
|||
execution version
|
||||
expected cstddef
|
||||
expected cstdlib
|
||||
expected exception
|
||||
expected initializer_list
|
||||
expected new
|
||||
expected version
|
||||
|
|
|
|
@ -213,7 +213,6 @@ exception version
|
|||
execution version
|
||||
expected cstddef
|
||||
expected cstdlib
|
||||
expected exception
|
||||
expected initializer_list
|
||||
expected new
|
||||
expected version
|
||||
|
|
|
|
@ -213,7 +213,6 @@ exception version
|
|||
execution version
|
||||
expected cstddef
|
||||
expected cstdlib
|
||||
expected exception
|
||||
expected initializer_list
|
||||
expected new
|
||||
expected version
|
||||
|
|
|
|
@ -213,7 +213,6 @@ exception version
|
|||
execution version
|
||||
expected cstddef
|
||||
expected cstdlib
|
||||
expected exception
|
||||
expected initializer_list
|
||||
expected new
|
||||
expected version
|
||||
|
|
|
|
@ -220,7 +220,6 @@ exception version
|
|||
execution version
|
||||
expected cstddef
|
||||
expected cstdlib
|
||||
expected exception
|
||||
expected initializer_list
|
||||
expected new
|
||||
expected version
|
||||
|
|
|
|
@ -151,7 +151,6 @@ exception version
|
|||
execution version
|
||||
expected cstddef
|
||||
expected cstdlib
|
||||
expected exception
|
||||
expected initializer_list
|
||||
expected new
|
||||
expected version
|
||||
|
@ -277,7 +276,6 @@ functional cstddef
|
|||
functional cstdint
|
||||
functional cstdlib
|
||||
functional cstring
|
||||
functional exception
|
||||
functional initializer_list
|
||||
functional iosfwd
|
||||
functional limits
|
||||
|
@ -293,7 +291,6 @@ future cstddef
|
|||
future cstdint
|
||||
future cstdlib
|
||||
future cstring
|
||||
future exception
|
||||
future initializer_list
|
||||
future iosfwd
|
||||
future limits
|
||||
|
@ -420,7 +417,6 @@ mutex typeinfo
|
|||
mutex version
|
||||
new cstddef
|
||||
new cstdlib
|
||||
new exception
|
||||
new version
|
||||
numbers version
|
||||
numeric cmath
|
||||
|
@ -548,7 +544,6 @@ stack deque
|
|||
stack initializer_list
|
||||
stack version
|
||||
stdexcept cstdlib
|
||||
stdexcept exception
|
||||
stdexcept iosfwd
|
||||
streambuf cstdint
|
||||
streambuf ios
|
||||
|
@ -618,7 +613,6 @@ typeindex version
|
|||
typeinfo cstddef
|
||||
typeinfo cstdint
|
||||
typeinfo cstdlib
|
||||
typeinfo exception
|
||||
unordered_map cmath
|
||||
unordered_map compare
|
||||
unordered_map cstddef
|
||||
|
@ -663,7 +657,6 @@ variant compare
|
|||
variant cstddef
|
||||
variant cstdint
|
||||
variant cstring
|
||||
variant exception
|
||||
variant initializer_list
|
||||
variant limits
|
||||
variant new
|
||||
|
|
|
|
@ -55,13 +55,14 @@
|
|||
// that terminate has been called)
|
||||
|
||||
|
||||
#include <condition_variable>
|
||||
#include <atomic>
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
#include <string>
|
||||
#include <cstdlib>
|
||||
#include <cassert>
|
||||
#include <chrono>
|
||||
#include <condition_variable>
|
||||
#include <cstdlib>
|
||||
#include <exception>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
|
||||
#include "make_test_thread.h"
|
||||
|
||||
|
|
|
@ -15,10 +15,11 @@
|
|||
|
||||
// ~thread();
|
||||
|
||||
#include <thread>
|
||||
#include <new>
|
||||
#include <cstdlib>
|
||||
#include <cassert>
|
||||
#include <cstdlib>
|
||||
#include <exception>
|
||||
#include <new>
|
||||
#include <thread>
|
||||
|
||||
#include "make_test_thread.h"
|
||||
#include "test_macros.h"
|
||||
|
|
Loading…
Reference in New Issue
Block a user