[llvm-branch-commits] [libcxx] [llvm] [libc++][C++03] Use `__cxx03/` headers in C++03 mode (PR #109002)
Louis Dionne via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Dec 9 07:55:17 PST 2024
================
@@ -79,42 +79,46 @@ namespace std {
} // namespace std
*/
-
-#include <__config>
-#include <__memory/allocator.h>
-#include <__memory/allocator_destructor.h>
-#include <__memory/allocator_traits.h>
-#include <__memory/unique_ptr.h>
-#include <__type_traits/add_cv_quals.h>
-#include <__type_traits/add_pointer.h>
-#include <__type_traits/aligned_storage.h>
-#include <__type_traits/conditional.h>
-#include <__type_traits/decay.h>
-#include <__type_traits/enable_if.h>
-#include <__type_traits/is_constructible.h>
-#include <__type_traits/is_function.h>
-#include <__type_traits/is_nothrow_constructible.h>
-#include <__type_traits/is_reference.h>
-#include <__type_traits/is_same.h>
-#include <__type_traits/is_void.h>
-#include <__type_traits/remove_cv.h>
-#include <__type_traits/remove_cvref.h>
-#include <__type_traits/remove_reference.h>
-#include <__utility/forward.h>
-#include <__utility/in_place.h>
-#include <__utility/move.h>
-#include <__utility/unreachable.h>
-#include <__verbose_abort>
-#include <initializer_list>
-#include <typeinfo>
-#include <version>
-
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-# pragma GCC system_header
-#endif
+#include <__configuration/language.h>
+
+#if defined(_LIBCPP_CXX03_LANG) && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
----------------
ldionne wrote:
It would be nice for this patch to be really straightforward to review, and that would be the case if not for the formatting changes. I would suggest frontloading a patch that does
```c++
#if 0
// nothing for now
#else
// existing code
#endif
```
That will cause all the formatting stuff to happen in that patch. We can then follow up with a patch that turns these `#if 0` into something real.
https://github.com/llvm/llvm-project/pull/109002
More information about the llvm-branch-commits
mailing list