diff --git a/libcxx/src/algorithm.cpp b/libcxx/src/algorithm.cpp --- a/libcxx/src/algorithm.cpp +++ b/libcxx/src/algorithm.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "algorithm" +#include _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/src/any.cpp b/libcxx/src/any.cpp --- a/libcxx/src/any.cpp +++ b/libcxx/src/any.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "any" +#include namespace std { const char* bad_any_cast::what() const noexcept { diff --git a/libcxx/src/bind.cpp b/libcxx/src/bind.cpp --- a/libcxx/src/bind.cpp +++ b/libcxx/src/bind.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "functional" +#include _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/src/charconv.cpp b/libcxx/src/charconv.cpp --- a/libcxx/src/charconv.cpp +++ b/libcxx/src/charconv.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "charconv" +#include #include #include "include/ryu/digit_table.h" diff --git a/libcxx/src/chrono.cpp b/libcxx/src/chrono.cpp --- a/libcxx/src/chrono.cpp +++ b/libcxx/src/chrono.cpp @@ -12,9 +12,9 @@ #define _LARGE_TIME_API #endif -#include "chrono" -#include "cerrno" // errno -#include "system_error" // __throw_system_error +#include // errno +#include +#include // __throw_system_error #if defined(__MVS__) #include <__support/ibm/gettod_zos.h> // gettimeofdayMonotonic diff --git a/libcxx/src/condition_variable.cpp b/libcxx/src/condition_variable.cpp --- a/libcxx/src/condition_variable.cpp +++ b/libcxx/src/condition_variable.cpp @@ -6,19 +6,21 @@ // //===----------------------------------------------------------------------===// -#include "__config" +#include <__config> #ifndef _LIBCPP_HAS_NO_THREADS -#include "condition_variable" -#include "thread" -#include "system_error" -#include "__undef_macros" +#include +#include +#include #if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB) -#pragma comment(lib, "pthread") +# pragma comment(lib, "pthread") #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD // ~condition_variable is defined elsewhere. @@ -90,4 +92,6 @@ _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // !_LIBCPP_HAS_NO_THREADS diff --git a/libcxx/src/condition_variable_destructor.cpp b/libcxx/src/condition_variable_destructor.cpp --- a/libcxx/src/condition_variable_destructor.cpp +++ b/libcxx/src/condition_variable_destructor.cpp @@ -11,8 +11,8 @@ // On some platforms ~condition_variable has been made trivial and the // definition is only provided for ABI compatibility. -#include "__config" -#include "__threading_support" +#include <__config> +#include <__threading_support> #if !defined(_LIBCPP_HAS_NO_THREADS) # if _LIBCPP_ABI_VERSION == 1 || !defined(_LIBCPP_HAS_TRIVIAL_CONDVAR_DESTRUCTION) diff --git a/libcxx/src/debug.cpp b/libcxx/src/debug.cpp --- a/libcxx/src/debug.cpp +++ b/libcxx/src/debug.cpp @@ -6,18 +6,19 @@ // //===----------------------------------------------------------------------===// -#include "__config" -#include "__debug" -#include "functional" -#include "algorithm" -#include "string" -#include "cstdio" -#include "__hash_table" +#include <__config> +#include <__debug> +#include <__hash_table> +#include +#include +#include +#include + #ifndef _LIBCPP_HAS_NO_THREADS -#include "mutex" -#if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB) -#pragma comment(lib, "pthread") -#endif +# include +# if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB) +# pragma comment(lib, "pthread") +# endif #endif _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/src/exception.cpp b/libcxx/src/exception.cpp --- a/libcxx/src/exception.cpp +++ b/libcxx/src/exception.cpp @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// -#include "exception" -#include "new" -#include "typeinfo" +#include +#include +#include #if defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI) #include diff --git a/libcxx/src/experimental/memory_resource.cpp b/libcxx/src/experimental/memory_resource.cpp --- a/libcxx/src/experimental/memory_resource.cpp +++ b/libcxx/src/experimental/memory_resource.cpp @@ -6,15 +6,15 @@ // //===----------------------------------------------------------------------===// -#include "experimental/memory_resource" +#include #ifndef _LIBCPP_HAS_NO_ATOMIC_HEADER -#include "atomic" +# include #elif !defined(_LIBCPP_HAS_NO_THREADS) -#include "mutex" -#if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB) -#pragma comment(lib, "pthread") -#endif +# include +# if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB) +# pragma comment(lib, "pthread") +# endif #endif _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR diff --git a/libcxx/src/filesystem/directory_iterator.cpp b/libcxx/src/filesystem/directory_iterator.cpp --- a/libcxx/src/filesystem/directory_iterator.cpp +++ b/libcxx/src/filesystem/directory_iterator.cpp @@ -6,10 +6,10 @@ // //===----------------------------------------------------------------------===// -#include "__config" -#include "filesystem" -#include "stack" +#include <__config> #include +#include +#include #include "filesystem_common.h" diff --git a/libcxx/src/filesystem/filesystem_common.h b/libcxx/src/filesystem/filesystem_common.h --- a/libcxx/src/filesystem/filesystem_common.h +++ b/libcxx/src/filesystem/filesystem_common.h @@ -9,15 +9,15 @@ #ifndef FILESYSTEM_COMMON_H #define FILESYSTEM_COMMON_H -#include "__config" -#include "array" -#include "chrono" -#include "climits" -#include "cstdarg" -#include "ctime" -#include "filesystem" -#include "ratio" -#include "system_error" +#include <__config> +#include +#include +#include +#include +#include +#include +#include +#include #include #if defined(_LIBCPP_WIN32API) diff --git a/libcxx/src/filesystem/int128_builtins.cpp b/libcxx/src/filesystem/int128_builtins.cpp --- a/libcxx/src/filesystem/int128_builtins.cpp +++ b/libcxx/src/filesystem/int128_builtins.cpp @@ -13,8 +13,8 @@ * * ===----------------------------------------------------------------------=== */ -#include "__config" -#include "climits" +#include <__config> +#include #if !defined(_LIBCPP_HAS_NO_INT128) diff --git a/libcxx/src/filesystem/operations.cpp b/libcxx/src/filesystem/operations.cpp --- a/libcxx/src/filesystem/operations.cpp +++ b/libcxx/src/filesystem/operations.cpp @@ -7,14 +7,14 @@ //===----------------------------------------------------------------------===// #include <__utility/unreachable.h> -#include "filesystem" -#include "array" -#include "iterator" -#include "string_view" -#include "type_traits" -#include "vector" -#include "cstdlib" -#include "climits" +#include +#include +#include +#include +#include +#include +#include +#include #include "filesystem_common.h" @@ -40,7 +40,7 @@ # include # define _LIBCPP_FILESYSTEM_USE_COPYFILE #else -# include "fstream" +# include # define _LIBCPP_FILESYSTEM_USE_FSTREAM #endif diff --git a/libcxx/src/filesystem/posix_compat.h b/libcxx/src/filesystem/posix_compat.h --- a/libcxx/src/filesystem/posix_compat.h +++ b/libcxx/src/filesystem/posix_compat.h @@ -23,7 +23,7 @@ #ifndef POSIX_COMPAT_H #define POSIX_COMPAT_H -#include "filesystem" +#include #include "filesystem_common.h" diff --git a/libcxx/src/format.cpp b/libcxx/src/format.cpp --- a/libcxx/src/format.cpp +++ b/libcxx/src/format.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "format" +#include _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/src/functional.cpp b/libcxx/src/functional.cpp --- a/libcxx/src/functional.cpp +++ b/libcxx/src/functional.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "functional" +#include _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/src/future.cpp b/libcxx/src/future.cpp --- a/libcxx/src/future.cpp +++ b/libcxx/src/future.cpp @@ -6,12 +6,12 @@ // //===----------------------------------------------------------------------===// -#include "__config" +#include <__config> #ifndef _LIBCPP_HAS_NO_THREADS -#include "future" -#include "string" +#include +#include _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/src/hash.cpp b/libcxx/src/hash.cpp --- a/libcxx/src/hash.cpp +++ b/libcxx/src/hash.cpp @@ -6,10 +6,10 @@ // //===----------------------------------------------------------------------===// -#include "__hash_table" -#include "algorithm" -#include "stdexcept" -#include "type_traits" +#include <__hash_table> +#include +#include +#include _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wtautological-constant-out-of-range-compare") diff --git a/libcxx/src/include/atomic_support.h b/libcxx/src/include/atomic_support.h --- a/libcxx/src/include/atomic_support.h +++ b/libcxx/src/include/atomic_support.h @@ -9,8 +9,8 @@ #ifndef ATOMIC_SUPPORT_H #define ATOMIC_SUPPORT_H -#include "__config" -#include "memory" // for __libcpp_relaxed_load +#include <__config> +#include // for __libcpp_relaxed_load #if defined(__clang__) && __has_builtin(__atomic_load_n) \ && __has_builtin(__atomic_store_n) \ diff --git a/libcxx/src/include/ryu/d2fixed.h b/libcxx/src/include/ryu/d2fixed.h --- a/libcxx/src/include/ryu/d2fixed.h +++ b/libcxx/src/include/ryu/d2fixed.h @@ -42,8 +42,8 @@ // Avoid formatting to keep the changes with the original code minimal. // clang-format off -#include "__config" -#include "cstdint" +#include <__config> +#include _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/src/include/ryu/d2fixed_full_table.h b/libcxx/src/include/ryu/d2fixed_full_table.h --- a/libcxx/src/include/ryu/d2fixed_full_table.h +++ b/libcxx/src/include/ryu/d2fixed_full_table.h @@ -42,7 +42,7 @@ // Avoid formatting to keep the changes with the original code minimal. // clang-format off -#include "__config" +#include <__config> _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/src/include/ryu/d2s.h b/libcxx/src/include/ryu/d2s.h --- a/libcxx/src/include/ryu/d2s.h +++ b/libcxx/src/include/ryu/d2s.h @@ -42,7 +42,7 @@ // Avoid formatting to keep the changes with the original code minimal. // clang-format off -#include "__config" +#include <__config> _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/src/include/ryu/d2s_full_table.h b/libcxx/src/include/ryu/d2s_full_table.h --- a/libcxx/src/include/ryu/d2s_full_table.h +++ b/libcxx/src/include/ryu/d2s_full_table.h @@ -42,7 +42,7 @@ // Avoid formatting to keep the changes with the original code minimal. // clang-format off -#include "__config" +#include <__config> _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/src/include/ryu/d2s_intrinsics.h b/libcxx/src/include/ryu/d2s_intrinsics.h --- a/libcxx/src/include/ryu/d2s_intrinsics.h +++ b/libcxx/src/include/ryu/d2s_intrinsics.h @@ -42,7 +42,7 @@ // Avoid formatting to keep the changes with the original code minimal. // clang-format off -#include "__config" +#include <__config> #include "include/ryu/ryu.h" diff --git a/libcxx/src/include/ryu/digit_table.h b/libcxx/src/include/ryu/digit_table.h --- a/libcxx/src/include/ryu/digit_table.h +++ b/libcxx/src/include/ryu/digit_table.h @@ -42,7 +42,7 @@ // Avoid formatting to keep the changes with the original code minimal. // clang-format off -#include "__config" +#include <__config> _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/src/include/ryu/f2s.h b/libcxx/src/include/ryu/f2s.h --- a/libcxx/src/include/ryu/f2s.h +++ b/libcxx/src/include/ryu/f2s.h @@ -42,7 +42,7 @@ // Avoid formatting to keep the changes with the original code minimal. // clang-format off -#include "__config" +#include <__config> _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/src/include/ryu/ryu.h b/libcxx/src/include/ryu/ryu.h --- a/libcxx/src/include/ryu/ryu.h +++ b/libcxx/src/include/ryu/ryu.h @@ -44,14 +44,15 @@ // Avoid formatting to keep the changes with the original code minimal. // clang-format off -#include "__charconv/chars_format.h" -#include "__charconv/to_chars_result.h" -#include "__config" -#include "__debug" -#include "__errc" -#include "cstdint" -#include "cstring" -#include "type_traits" +#include <__charconv/chars_format.h> +#include <__charconv/to_chars_result.h> +#include <__config> +#include <__debug> +#include <__errc> +#include +#include +#include + #include "include/ryu/f2s.h" #include "include/ryu/d2s.h" #include "include/ryu/d2fixed.h" diff --git a/libcxx/src/include/to_chars_floating_point.h b/libcxx/src/include/to_chars_floating_point.h --- a/libcxx/src/include/to_chars_floating_point.h +++ b/libcxx/src/include/to_chars_floating_point.h @@ -17,16 +17,17 @@ // Avoid formatting to keep the changes with the original code minimal. // clang-format off -#include "__algorithm/find.h" -#include "__algorithm/find_if.h" -#include "__algorithm/lower_bound.h" -#include "__algorithm/min.h" -#include "__config" -#include "__iterator/access.h" -#include "__iterator/size.h" -#include "bit" -#include "cfloat" -#include "climits" +#include <__algorithm/find.h> +#include <__algorithm/find_if.h> +#include <__algorithm/lower_bound.h> +#include <__algorithm/min.h> +#include <__config> +#include <__iterator/access.h> +#include <__iterator/size.h> +#include +#include +#include + #include "include/ryu/ryu.h" _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/src/ios.cpp b/libcxx/src/ios.cpp --- a/libcxx/src/ios.cpp +++ b/libcxx/src/ios.cpp @@ -6,20 +6,20 @@ // //===----------------------------------------------------------------------===// -#include "__config" - -#include "ios" - +#include <__config> +#include <__locale> +#include +#include +#include +#include +#include #include +#include -#include "__locale" -#include "algorithm" #include "include/config_elast.h" -#include "limits" -#include "memory" -#include "new" -#include "string" -#include "__undef_macros" + +_LIBCPP_PUSH_MACROS +#include <__undef_macros> _LIBCPP_BEGIN_NAMESPACE_STD @@ -439,3 +439,5 @@ } _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS diff --git a/libcxx/src/ios.instantiations.cpp b/libcxx/src/ios.instantiations.cpp --- a/libcxx/src/ios.instantiations.cpp +++ b/libcxx/src/ios.instantiations.cpp @@ -6,14 +6,13 @@ // //===----------------------------------------------------------------------===// -#include "__config" -#include "fstream" -#include "ios" -#include "istream" -#include "ostream" -#include "sstream" -#include "streambuf" - +#include <__config> +#include +#include +#include +#include +#include +#include _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/src/iostream.cpp b/libcxx/src/iostream.cpp --- a/libcxx/src/iostream.cpp +++ b/libcxx/src/iostream.cpp @@ -6,10 +6,10 @@ // //===----------------------------------------------------------------------===// -#include "__std_stream" -#include "__locale" -#include "string" -#include "new" +#include <__locale> +#include <__std_stream> +#include +#include #define _str(s) #s #define str(s) _str(s) diff --git a/libcxx/src/legacy_pointer_safety.cpp b/libcxx/src/legacy_pointer_safety.cpp --- a/libcxx/src/legacy_pointer_safety.cpp +++ b/libcxx/src/legacy_pointer_safety.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "__config" +#include <__config> #include // Support for garbage collection was removed in C++23 by https://wg21.link/P2186R2. Libc++ implements diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp --- a/libcxx/src/locale.cpp +++ b/libcxx/src/locale.cpp @@ -13,20 +13,20 @@ #endif #include <__utility/unreachable.h> -#include "algorithm" -#include "clocale" -#include "codecvt" -#include "cstdio" -#include "cstdlib" -#include "cstring" -#include "locale" -#include "string" -#include "type_traits" -#include "typeinfo" -#include "vector" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS -# include "cwctype" +# include #endif #if defined(_AIX) @@ -45,12 +45,14 @@ #include "include/atomic_support.h" #include "include/sso_allocator.h" -#include "__undef_macros" // On Linux, wint_t and wchar_t have different signed-ness, and this causes // lots of noise in the build log, but no bugs that I know of. _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wsign-conversion") +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD struct __libcpp_unique_locale { @@ -6587,3 +6589,5 @@ #endif _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS diff --git a/libcxx/src/memory.cpp b/libcxx/src/memory.cpp --- a/libcxx/src/memory.cpp +++ b/libcxx/src/memory.cpp @@ -6,14 +6,16 @@ // //===----------------------------------------------------------------------===// -#include "memory" +#include + #ifndef _LIBCPP_HAS_NO_THREADS -# include "mutex" -# include "thread" -# if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB) -# pragma comment(lib, "pthread") -# endif +# include +# include +# if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB) +# pragma comment(lib, "pthread") +# endif #endif + #include "include/atomic_support.h" _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/src/mutex.cpp b/libcxx/src/mutex.cpp --- a/libcxx/src/mutex.cpp +++ b/libcxx/src/mutex.cpp @@ -6,19 +6,23 @@ // //===----------------------------------------------------------------------===// -#include "mutex" -#include "limits" -#include "system_error" +#include +#include +#include + #include "include/atomic_support.h" -#include "__undef_macros" #ifndef _LIBCPP_HAS_NO_THREADS -#if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB) -#pragma comment(lib, "pthread") -#endif +# if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB) +# pragma comment(lib, "pthread") +# endif #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_STD + #ifndef _LIBCPP_HAS_NO_THREADS const defer_lock_t defer_lock{}; @@ -258,3 +262,5 @@ } _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS diff --git a/libcxx/src/mutex_destructor.cpp b/libcxx/src/mutex_destructor.cpp --- a/libcxx/src/mutex_destructor.cpp +++ b/libcxx/src/mutex_destructor.cpp @@ -16,13 +16,13 @@ // we re-declare the entire class in this file instead of using // _LIBCPP_BUILDING_LIBRARY to change the definition in the headers. -#include "__config" -#include "__threading_support" +#include <__config> +#include <__threading_support> #if !defined(_LIBCPP_HAS_NO_THREADS) -#if _LIBCPP_ABI_VERSION == 1 || !defined(_LIBCPP_HAS_TRIVIAL_MUTEX_DESTRUCTION) -#define NEEDS_MUTEX_DESTRUCTOR -#endif +# if _LIBCPP_ABI_VERSION == 1 || !defined(_LIBCPP_HAS_TRIVIAL_MUTEX_DESTRUCTION) +# define NEEDS_MUTEX_DESTRUCTOR +# endif #endif _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/src/new.cpp b/libcxx/src/new.cpp --- a/libcxx/src/new.cpp +++ b/libcxx/src/new.cpp @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// +#include #include -#include "new" #include "include/atomic_support.h" #if defined(_LIBCPP_ABI_MICROSOFT) diff --git a/libcxx/src/optional.cpp b/libcxx/src/optional.cpp --- a/libcxx/src/optional.cpp +++ b/libcxx/src/optional.cpp @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include "optional" -#include "__availability" +#include <__availability> +#include namespace std { diff --git a/libcxx/src/random.cpp b/libcxx/src/random.cpp --- a/libcxx/src/random.cpp +++ b/libcxx/src/random.cpp @@ -13,9 +13,9 @@ # define _CRT_RAND_S #endif // defined(_LIBCPP_USING_WIN32_RANDOM) -#include "limits" -#include "random" -#include "system_error" +#include +#include +#include #if defined(__sun__) # define rename solaris_headers_are_broken diff --git a/libcxx/src/random_shuffle.cpp b/libcxx/src/random_shuffle.cpp --- a/libcxx/src/random_shuffle.cpp +++ b/libcxx/src/random_shuffle.cpp @@ -6,13 +6,14 @@ // //===----------------------------------------------------------------------===// -#include "algorithm" -#include "random" +#include +#include + #ifndef _LIBCPP_HAS_NO_THREADS -# include "mutex" -# if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB) -# pragma comment(lib, "pthread") -# endif +# include +# if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB) +# pragma comment(lib, "pthread") +# endif #endif _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/src/regex.cpp b/libcxx/src/regex.cpp --- a/libcxx/src/regex.cpp +++ b/libcxx/src/regex.cpp @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// -#include "regex" -#include "algorithm" -#include "iterator" +#include +#include +#include _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/src/ryu/d2fixed.cpp b/libcxx/src/ryu/d2fixed.cpp --- a/libcxx/src/ryu/d2fixed.cpp +++ b/libcxx/src/ryu/d2fixed.cpp @@ -39,10 +39,10 @@ // Avoid formatting to keep the changes with the original code minimal. // clang-format off -#include "__config" -#include "charconv" -#include "cstring" -#include "system_error" +#include <__config> +#include +#include +#include #include "include/ryu/common.h" #include "include/ryu/d2fixed.h" diff --git a/libcxx/src/ryu/d2s.cpp b/libcxx/src/ryu/d2s.cpp --- a/libcxx/src/ryu/d2s.cpp +++ b/libcxx/src/ryu/d2s.cpp @@ -39,8 +39,8 @@ // Avoid formatting to keep the changes with the original code minimal. // clang-format off -#include "__config" -#include "charconv" +#include <__config> +#include #include "include/ryu/common.h" #include "include/ryu/d2fixed.h" diff --git a/libcxx/src/ryu/f2s.cpp b/libcxx/src/ryu/f2s.cpp --- a/libcxx/src/ryu/f2s.cpp +++ b/libcxx/src/ryu/f2s.cpp @@ -39,8 +39,8 @@ // Avoid formatting to keep the changes with the original code minimal. // clang-format off -#include "__config" -#include "charconv" +#include <__config> +#include #include "include/ryu/common.h" #include "include/ryu/d2fixed.h" diff --git a/libcxx/src/shared_mutex.cpp b/libcxx/src/shared_mutex.cpp --- a/libcxx/src/shared_mutex.cpp +++ b/libcxx/src/shared_mutex.cpp @@ -6,12 +6,13 @@ // //===----------------------------------------------------------------------===// -#include "__config" +#include <__config> + #ifndef _LIBCPP_HAS_NO_THREADS -#include "shared_mutex" +#include #if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB) -#pragma comment(lib, "pthread") +# pragma comment(lib, "pthread") #endif _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/src/stdexcept.cpp b/libcxx/src/stdexcept.cpp --- a/libcxx/src/stdexcept.cpp +++ b/libcxx/src/stdexcept.cpp @@ -6,11 +6,10 @@ // //===----------------------------------------------------------------------===// -#include "stdexcept" -#include "new" -#include "string" -#include "system_error" - +#include +#include +#include +#include #ifdef _LIBCPP_ABI_VCRUNTIME #include "support/runtime/stdexcept_vcruntime.ipp" diff --git a/libcxx/src/string.cpp b/libcxx/src/string.cpp --- a/libcxx/src/string.cpp +++ b/libcxx/src/string.cpp @@ -6,17 +6,17 @@ // //===----------------------------------------------------------------------===// -#include "string" -#include "charconv" -#include "cstdlib" -#include "cerrno" -#include "limits" -#include "stdexcept" +#include <__debug> +#include +#include +#include +#include +#include #include -#include "__debug" +#include #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS -# include "cwchar" +# include #endif _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/src/strstream.cpp b/libcxx/src/strstream.cpp --- a/libcxx/src/strstream.cpp +++ b/libcxx/src/strstream.cpp @@ -7,13 +7,15 @@ //===----------------------------------------------------------------------===// #include <__utility/unreachable.h> -#include "strstream" -#include "algorithm" -#include "climits" -#include "cstring" -#include "cstdlib" -#include "__debug" -#include "__undef_macros" +#include <__debug> +#include +#include +#include +#include +#include + +_LIBCPP_PUSH_MACROS +#include <__undef_macros> _LIBCPP_BEGIN_NAMESPACE_STD @@ -334,3 +336,5 @@ } _LIBCPP_END_NAMESPACE_STD + +_LIBCPP_POP_MACROS diff --git a/libcxx/src/system_error.cpp b/libcxx/src/system_error.cpp --- a/libcxx/src/system_error.cpp +++ b/libcxx/src/system_error.cpp @@ -6,18 +6,17 @@ // //===----------------------------------------------------------------------===// -#include "__config" - -#include "system_error" +#include <__config> +#include <__debug> +#include +#include +#include +#include +#include +#include +#include #include "include/config_elast.h" -#include "cerrno" -#include "cstring" -#include "cstdio" -#include "cstdlib" -#include "string" -#include "string.h" -#include "__debug" #if defined(__ANDROID__) #include diff --git a/libcxx/src/thread.cpp b/libcxx/src/thread.cpp --- a/libcxx/src/thread.cpp +++ b/libcxx/src/thread.cpp @@ -6,14 +6,15 @@ // //===----------------------------------------------------------------------===// -#include "__config" +#include <__config> + #ifndef _LIBCPP_HAS_NO_THREADS -#include "thread" -#include "exception" -#include "vector" -#include "future" -#include "limits" +#include +#include +#include +#include +#include #if __has_include() # include // for sysconf diff --git a/libcxx/src/typeinfo.cpp b/libcxx/src/typeinfo.cpp --- a/libcxx/src/typeinfo.cpp +++ b/libcxx/src/typeinfo.cpp @@ -6,9 +6,10 @@ // //===----------------------------------------------------------------------===// -#include "typeinfo" +#include #if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_ABI_VCRUNTIME) + #include int std::type_info::__compare(const type_info &__rhs) const noexcept { diff --git a/libcxx/src/utility.cpp b/libcxx/src/utility.cpp --- a/libcxx/src/utility.cpp +++ b/libcxx/src/utility.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "utility" +#include _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/src/valarray.cpp b/libcxx/src/valarray.cpp --- a/libcxx/src/valarray.cpp +++ b/libcxx/src/valarray.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "valarray" +#include _LIBCPP_BEGIN_NAMESPACE_STD diff --git a/libcxx/src/variant.cpp b/libcxx/src/variant.cpp --- a/libcxx/src/variant.cpp +++ b/libcxx/src/variant.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "variant" +#include namespace std { diff --git a/libcxx/src/vector.cpp b/libcxx/src/vector.cpp --- a/libcxx/src/vector.cpp +++ b/libcxx/src/vector.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "vector" +#include _LIBCPP_BEGIN_NAMESPACE_STD