[libcxx-commits] [libcxx] 8ff2d6a - [libc++] Reduces the number of transitive includes.

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Wed Aug 31 10:50:14 PDT 2022


Author: Mark de Wever
Date: 2022-08-31T19:50:03+02:00
New Revision: 8ff2d6af6906261567d8c10be62711ce899fb485

URL: https://github.com/llvm/llvm-project/commit/8ff2d6af6906261567d8c10be62711ce899fb485
DIFF: https://github.com/llvm/llvm-project/commit/8ff2d6af6906261567d8c10be62711ce899fb485.diff

LOG: [libc++] Reduces the number of transitive includes.

This defines a new policy for removal of transitive includes.
The goal of the policy it to make it relatively easy to remove
headers when needed, but avoid breaking developers using and
vendors shipping libc++.

The method used is to guard transitive includes based on the
C++ language version. For the upcoming C++23 we can remove
headers when we want, but for other language versions we try
to keep it to a minimum.

In this code the transitive include of `<chrono>` is removed
since D128577 introduces a header cycle between `<format>`
and `<chrono>`. This cycle is indirectly required by the
Standard. Our cycle dependency tool basically is a grep based
tool, so it needs some hints to ignore cycles. With the input
of our transitive include tests we can create a better tool.
However that's out of the scope of this patch.

Note the flag `_LIBCPP_REMOVE_TRANSITIVE_INCLUDES` remains
unchanged. So users can still opt-out of transitives includes
entirely.

Reviewed By: #libc, ldionne, philnik

Differential Revision: https://reviews.llvm.org/D132284

Added: 
    libcxx/docs/DesignDocs/HeaderRemovalPolicy.rst

Modified: 
    libcxx/docs/ReleaseNotes.rst
    libcxx/docs/index.rst
    libcxx/include/algorithm
    libcxx/include/any
    libcxx/include/array
    libcxx/include/atomic
    libcxx/include/bit
    libcxx/include/charconv
    libcxx/include/coroutine
    libcxx/include/deque
    libcxx/include/experimental/simd
    libcxx/include/experimental/unordered_map
    libcxx/include/ext/hash_map
    libcxx/include/ext/hash_set
    libcxx/include/forward_list
    libcxx/include/functional
    libcxx/include/future
    libcxx/include/iterator
    libcxx/include/list
    libcxx/include/locale
    libcxx/include/map
    libcxx/include/memory
    libcxx/include/mutex
    libcxx/include/numeric
    libcxx/include/optional
    libcxx/include/ostream
    libcxx/include/random
    libcxx/include/regex
    libcxx/include/set
    libcxx/include/span
    libcxx/include/stack
    libcxx/include/string
    libcxx/include/string_view
    libcxx/include/thread
    libcxx/include/tuple
    libcxx/include/typeindex
    libcxx/include/unordered_map
    libcxx/include/unordered_set
    libcxx/include/utility
    libcxx/include/valarray
    libcxx/include/variant
    libcxx/include/vector
    libcxx/test/libcxx/transitive_includes/cxx20/expected.algorithm
    libcxx/test/libcxx/transitive_includes/cxx20/expected.any
    libcxx/test/libcxx/transitive_includes/cxx20/expected.array
    libcxx/test/libcxx/transitive_includes/cxx20/expected.atomic
    libcxx/test/libcxx/transitive_includes/cxx20/expected.barrier
    libcxx/test/libcxx/transitive_includes/cxx20/expected.bitset
    libcxx/test/libcxx/transitive_includes/cxx20/expected.ccomplex
    libcxx/test/libcxx/transitive_includes/cxx20/expected.codecvt
    libcxx/test/libcxx/transitive_includes/cxx20/expected.complex
    libcxx/test/libcxx/transitive_includes/cxx20/expected.condition_variable
    libcxx/test/libcxx/transitive_includes/cxx20/expected.ctgmath
    libcxx/test/libcxx/transitive_includes/cxx20/expected.deque
    libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_algorithm
    libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_coroutine
    libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_deque
    libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_forward_list
    libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_functional
    libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_list
    libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_map
    libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_memory_resource
    libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_regex
    libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_set
    libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_simd
    libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_string
    libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_unordered_map
    libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_unordered_set
    libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_vector
    libcxx/test/libcxx/transitive_includes/cxx20/expected.ext_hash_map
    libcxx/test/libcxx/transitive_includes/cxx20/expected.ext_hash_set
    libcxx/test/libcxx/transitive_includes/cxx20/expected.filesystem
    libcxx/test/libcxx/transitive_includes/cxx20/expected.format
    libcxx/test/libcxx/transitive_includes/cxx20/expected.forward_list
    libcxx/test/libcxx/transitive_includes/cxx20/expected.fstream
    libcxx/test/libcxx/transitive_includes/cxx20/expected.functional
    libcxx/test/libcxx/transitive_includes/cxx20/expected.future
    libcxx/test/libcxx/transitive_includes/cxx20/expected.iomanip
    libcxx/test/libcxx/transitive_includes/cxx20/expected.ios
    libcxx/test/libcxx/transitive_includes/cxx20/expected.iostream
    libcxx/test/libcxx/transitive_includes/cxx20/expected.istream
    libcxx/test/libcxx/transitive_includes/cxx20/expected.latch
    libcxx/test/libcxx/transitive_includes/cxx20/expected.list
    libcxx/test/libcxx/transitive_includes/cxx20/expected.locale
    libcxx/test/libcxx/transitive_includes/cxx20/expected.map
    libcxx/test/libcxx/transitive_includes/cxx20/expected.memory
    libcxx/test/libcxx/transitive_includes/cxx20/expected.mutex
    libcxx/test/libcxx/transitive_includes/cxx20/expected.numeric
    libcxx/test/libcxx/transitive_includes/cxx20/expected.optional
    libcxx/test/libcxx/transitive_includes/cxx20/expected.ostream
    libcxx/test/libcxx/transitive_includes/cxx20/expected.queue
    libcxx/test/libcxx/transitive_includes/cxx20/expected.random
    libcxx/test/libcxx/transitive_includes/cxx20/expected.ranges
    libcxx/test/libcxx/transitive_includes/cxx20/expected.regex
    libcxx/test/libcxx/transitive_includes/cxx20/expected.scoped_allocator
    libcxx/test/libcxx/transitive_includes/cxx20/expected.semaphore
    libcxx/test/libcxx/transitive_includes/cxx20/expected.set
    libcxx/test/libcxx/transitive_includes/cxx20/expected.shared_mutex
    libcxx/test/libcxx/transitive_includes/cxx20/expected.span
    libcxx/test/libcxx/transitive_includes/cxx20/expected.sstream
    libcxx/test/libcxx/transitive_includes/cxx20/expected.stack
    libcxx/test/libcxx/transitive_includes/cxx20/expected.streambuf
    libcxx/test/libcxx/transitive_includes/cxx20/expected.string
    libcxx/test/libcxx/transitive_includes/cxx20/expected.string_view
    libcxx/test/libcxx/transitive_includes/cxx20/expected.strstream
    libcxx/test/libcxx/transitive_includes/cxx20/expected.system_error
    libcxx/test/libcxx/transitive_includes/cxx20/expected.thread
    libcxx/test/libcxx/transitive_includes/cxx20/expected.unordered_map
    libcxx/test/libcxx/transitive_includes/cxx20/expected.unordered_set
    libcxx/test/libcxx/transitive_includes/cxx20/expected.valarray
    libcxx/test/libcxx/transitive_includes/cxx20/expected.vector
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.algorithm
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.any
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.array
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.atomic
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.barrier
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.bit
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.bitset
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.ccomplex
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.charconv
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.codecvt
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.complex
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.condition_variable
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.coroutine
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.ctgmath
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.deque
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_algorithm
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_coroutine
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_deque
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_forward_list
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_functional
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_iterator
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_list
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_map
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_memory_resource
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_regex
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_set
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_simd
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_string
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_unordered_map
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_unordered_set
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_utility
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_vector
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.ext_hash_map
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.ext_hash_set
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.filesystem
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.format
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.forward_list
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.fstream
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.functional
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.future
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.iomanip
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.ios
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.iostream
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.istream
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.iterator
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.latch
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.list
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.locale
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.map
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.memory
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.mutex
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.numeric
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.optional
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.ostream
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.queue
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.random
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.ranges
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.regex
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.scoped_allocator
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.semaphore
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.set
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.shared_mutex
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.span
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.sstream
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.stack
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.streambuf
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.string
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.string_view
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.strstream
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.system_error
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.thread
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.tuple
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.typeindex
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.unordered_map
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.unordered_set
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.utility
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.valarray
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.variant
    libcxx/test/libcxx/transitive_includes/cxx2b/expected.vector
    libcxx/utils/graph_header_deps.py

Removed: 
    


################################################################################
diff  --git a/libcxx/docs/DesignDocs/HeaderRemovalPolicy.rst b/libcxx/docs/DesignDocs/HeaderRemovalPolicy.rst
new file mode 100644
index 0000000000000..76947083866d2
--- /dev/null
+++ b/libcxx/docs/DesignDocs/HeaderRemovalPolicy.rst
@@ -0,0 +1,74 @@
+=====================
+Header Removal Policy
+=====================
+
+Policy
+------
+
+Libc++ is in the process of splitting larger headers into smaller modular
+headers. This makes it possible to remove these large headers from other
+headers. For example, instead of including ``<algorithm>`` entirely it is
+possible to only include the headers for the algorithms used. When the
+Standard indirectly adds additional header includes, using the smaller headers
+aids reducing the growth of top-level headers. For example ``<atomic>`` uses
+``std::chrono::nanoseconds`` and included ``<chrono>``. In C++20 ``<chrono>``
+requires ``<format>`` which adds several other headers (like ``<string>``,
+``<optional>``, ``<tuple>``) which are not needed in ``<atomic>``.
+
+The benefit of using minimal headers is that the size of libc++'s top-level
+headers becomes smaller. This improves the compilation time when users include
+a top-level header. It also avoids header inclusion cycles and makes it easier
+to port headers to platforms with reduced functionality.
+
+A disadvantage is that users unknowingly depend on these transitive includes.
+Thus removing an include might break their build after upgrading a newer
+version of libc++. For example, ``<algorithm>`` is often forgotten but using
+algorithms will still work through those transitive includes. This problem is
+solved by modules, however in practice most people do not use modules (yet).
+
+To ease the removal of transitive includes in libc++, libc++ will remove
+unnecessary transitive includes in newly supported C++ versions. This means
+that users will have to fix their missing includes in order to upgrade to a
+newer version of the Standard. Libc++ also reserves the right to remove
+transitive includes at any other time, however new language versions will be
+used as a convenient way to perform bulk removals of transitive includes.
+
+For libc++ developers, this means that any transitive include removal must be
+guarded by something of the form:
+
+.. code-block:: cpp
+
+   #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+   #  include <algorithm>
+   #  include <iterator>
+   #  include <utility>
+   #endif
+
+When users define ``_LIBCPP_REMOVE_TRANSITIVE_INCLUDES``, libc++ will not
+include transitive headers, regardless of the language version. This can be
+useful for users to aid the transition to a newer language version, or by users
+who simply want to make sure they include what they use in their code.
+
+One of the issues for libc++ with transitive includes is that these includes
+may create dependency cycles and cause the validation script
+``libcxx/utils/graph_header_deps.py`` to have false positives. To ignore an
+include from the validation script, add a comment containing ``IGNORE-CYCLE``.
+This should only be used when there is a cycle and it has been verified it is a
+false positive.
+
+.. code-block:: cpp
+
+   #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 17
+   #  include <chrono> // IGNORE-CYCLE due to <format>
+   #endif
+
+
+Rationale
+---------
+
+Removing headers is not only an issue for software developers, but also for
+vendors. When a vendor updates libc++ several of their upstream packages might
+fail to compile, forcing them to fix these packages or file a bug with their
+upstream packages. Usually upgrading software to a new language standard is
+done explicitly by software developers. This means they most likely will
+discover and fix the missing includes, lessening the burden for the vendors.

diff  --git a/libcxx/docs/ReleaseNotes.rst b/libcxx/docs/ReleaseNotes.rst
index a89d4cdeb6202..fda4b69b34957 100644
--- a/libcxx/docs/ReleaseNotes.rst
+++ b/libcxx/docs/ReleaseNotes.rst
@@ -45,6 +45,24 @@ Improvements and New Features
 
 Deprecations and Removals
 -------------------------
+- Several incidental transitive includes have been removed from libc++. Those
+  includes are removed based on the language version used. Incidental transitive
+  inclusions of the following headers have been removed:
+
+  - C++20: ``chrono``
+  - C++2b: ``algorithm``, ``array``, ``atomic``, ``bit``, ``chrono``,
+    ``climits``, ``cmath``, ``compare``, ``concepts``, ``cstdlib``,
+    ``cstring``, ``ctime``, ``exception``, ``functional``,
+    ``initializer_list``, ``iosfwd``, ``iterator``, ``memory``, ``new``,
+    ``optional``, ``ratio``, ``stdexcept``, ``tuple``, ``typeinfo``,
+    ``unordered_map``, ``utility``, ``variant``, ``vector``.
+
+  Users can also remove all incidental transitive includes by defining
+  ``_LIBCPP_REMOVE_TRANSITIVE_INCLUDES`` regardless of the language version
+  in use. Note that in the future, libc++ reserves the right to remove
+  incidental transitive includes more aggressively, in particular regardless
+  of the language version in use.
+
 
 Upcoming Deprecations and Removals
 ----------------------------------

diff  --git a/libcxx/docs/index.rst b/libcxx/docs/index.rst
index 71674e75904a4..4964d1356ac2b 100644
--- a/libcxx/docs/index.rst
+++ b/libcxx/docs/index.rst
@@ -175,6 +175,7 @@ Design Documents
    DesignDocs/ExtendedCXX03Support
    DesignDocs/FeatureTestMacros
    DesignDocs/FileTimeType
+   DesignDocs/HeaderRemovalPolicy
    DesignDocs/NoexceptPolicy
    DesignDocs/ThreadingSupportAPI
    DesignDocs/UniquePtrTrivialAbi

diff  --git a/libcxx/include/algorithm b/libcxx/include/algorithm
index 69ada038747cf..0b54fb9a8a940 100644
--- a/libcxx/include/algorithm
+++ b/libcxx/include/algorithm
@@ -1899,8 +1899,11 @@ template <class BidirectionalIterator, class Compare>
 #include <__algorithm/unwrap_iter.h>
 #include <__algorithm/upper_bound.h>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-#  include <chrono>
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 17
+#  include <chrono> // IGNORE-CYCLE due to <format>
+#endif
+
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <iterator>
 #  include <utility>
 #endif

diff  --git a/libcxx/include/any b/libcxx/include/any
index b256630b05785..cd704a9543a5b 100644
--- a/libcxx/include/any
+++ b/libcxx/include/any
@@ -94,8 +94,8 @@ namespace std {
 #include <typeinfo>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-#  include <chrono>
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 17
+#  include <chrono> // IGNORE-CYCLE due to <format>
 #endif
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)

diff  --git a/libcxx/include/array b/libcxx/include/array
index 309ae8b715682..415ac162c89d8 100644
--- a/libcxx/include/array
+++ b/libcxx/include/array
@@ -123,7 +123,7 @@ template <size_t I, class T, size_t N> const T&& get(const array<T, N>&&) noexce
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <algorithm>
 #  include <iterator>
 #  include <utility>

diff  --git a/libcxx/include/atomic b/libcxx/include/atomic
index 892b28a94e3ed..2e920889dcdce 100644
--- a/libcxx/include/atomic
+++ b/libcxx/include/atomic
@@ -534,8 +534,13 @@ template <class T>
 # include <__threading_support>
 #endif
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-#  include <chrono>
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 17
+#  include <chrono> // IGNORE-CYCLE due to <format>
+#endif
+
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+#  include <cmath>
+#  include <compare>
 #endif
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)

diff  --git a/libcxx/include/bit b/libcxx/include/bit
index c899458dc312d..1505c9bd7f02f 100644
--- a/libcxx/include/bit
+++ b/libcxx/include/bit
@@ -71,7 +71,7 @@ namespace std {
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <iosfwd>
 #endif
 

diff  --git a/libcxx/include/charconv b/libcxx/include/charconv
index 4f00755a83bbf..d77cf3a05156c 100644
--- a/libcxx/include/charconv
+++ b/libcxx/include/charconv
@@ -97,7 +97,7 @@ namespace std {
 #include <limits>
 #include <type_traits>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <iosfwd>
 #endif
 

diff  --git a/libcxx/include/coroutine b/libcxx/include/coroutine
index 6582f5554ed04..d7ed44ee75e20 100644
--- a/libcxx/include/coroutine
+++ b/libcxx/include/coroutine
@@ -46,7 +46,7 @@ struct suspend_always;
 #include <__coroutine/trivial_awaitables.h>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <iosfwd>
 #endif
 

diff  --git a/libcxx/include/deque b/libcxx/include/deque
index 4a5136b3500f7..c38b544444ed9 100644
--- a/libcxx/include/deque
+++ b/libcxx/include/deque
@@ -185,7 +185,7 @@ template <class T, class Allocator, class Predicate>
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <algorithm>
 #  include <functional>
 #  include <iterator>

diff  --git a/libcxx/include/experimental/simd b/libcxx/include/experimental/simd
index c474292ffcb9c..532bc644a5029 100644
--- a/libcxx/include/experimental/simd
+++ b/libcxx/include/experimental/simd
@@ -656,7 +656,7 @@ public:
 #include <experimental/__config>
 #include <tuple>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <algorithm>
 #  include <functional>
 #endif

diff  --git a/libcxx/include/experimental/unordered_map b/libcxx/include/experimental/unordered_map
index a5627e76b2e11..db114dc1d115c 100644
--- a/libcxx/include/experimental/unordered_map
+++ b/libcxx/include/experimental/unordered_map
@@ -45,7 +45,7 @@ namespace pmr {
 #include <experimental/memory_resource>
 #include <unordered_map>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <algorithm>
 #  include <array>
 #  include <bit>

diff  --git a/libcxx/include/ext/hash_map b/libcxx/include/ext/hash_map
index a91716d1e6224..ab5a896dd5569 100644
--- a/libcxx/include/ext/hash_map
+++ b/libcxx/include/ext/hash_map
@@ -210,7 +210,7 @@ template <class Key, class T, class Hash, class Pred, class Alloc>
 #include <stdexcept>
 #include <type_traits>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <iterator>
 #endif
 

diff  --git a/libcxx/include/ext/hash_set b/libcxx/include/ext/hash_set
index 1c9b5e799aca1..332d6091065cb 100644
--- a/libcxx/include/ext/hash_set
+++ b/libcxx/include/ext/hash_set
@@ -199,7 +199,7 @@ template <class Value, class Hash, class Pred, class Alloc>
 #include <ext/__hash>
 #include <functional>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <iterator>
 #endif
 

diff  --git a/libcxx/include/forward_list b/libcxx/include/forward_list
index f35aa85d454c3..c9fc20b30f1c6 100644
--- a/libcxx/include/forward_list
+++ b/libcxx/include/forward_list
@@ -195,7 +195,7 @@ template <class T, class Allocator, class Predicate>
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <algorithm>
 #  include <functional>
 #  include <iterator>

diff  --git a/libcxx/include/functional b/libcxx/include/functional
index de02059f642a3..c969d7f70e3fc 100644
--- a/libcxx/include/functional
+++ b/libcxx/include/functional
@@ -539,7 +539,7 @@ POLICY:  For non-variadic implementations, the number of arguments is limited
 #include <typeinfo>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <utility>
 #endif
 

diff  --git a/libcxx/include/future b/libcxx/include/future
index 5c29b28f57f9f..643600a75ba0f 100644
--- a/libcxx/include/future
+++ b/libcxx/include/future
@@ -378,8 +378,8 @@ template <class R, class Alloc> struct uses_allocator<packaged_task<R>, Alloc>;
 #include <thread>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-#  include <chrono>
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 17
+#  include <chrono> // IGNORE-CYCLE due to <format>
 #endif
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)

diff  --git a/libcxx/include/iterator b/libcxx/include/iterator
index 225ae815363ce..6555b6d005293 100644
--- a/libcxx/include/iterator
+++ b/libcxx/include/iterator
@@ -724,7 +724,7 @@ template <class E> constexpr const E* data(initializer_list<E> il) noexcept;
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <exception>
 #  include <new>
 #  include <typeinfo>

diff  --git a/libcxx/include/list b/libcxx/include/list
index 5fcbd67c67036..668875bef7170 100644
--- a/libcxx/include/list
+++ b/libcxx/include/list
@@ -203,7 +203,7 @@ template <class T, class Allocator, class Predicate>
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <algorithm>
 #  include <functional>
 #  include <iterator>

diff  --git a/libcxx/include/locale b/libcxx/include/locale
index ff12f665156ce..c7da7836384e4 100644
--- a/libcxx/include/locale
+++ b/libcxx/include/locale
@@ -211,7 +211,7 @@ template <class charT> class messages_byname;
 #include <streambuf>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <iterator>
 #endif
 

diff  --git a/libcxx/include/map b/libcxx/include/map
index e1d5fa8a25d88..8b21f482928a2 100644
--- a/libcxx/include/map
+++ b/libcxx/include/map
@@ -546,7 +546,7 @@ erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred);  // C++20
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <functional>
 #  include <iterator>
 #  include <utility>

diff  --git a/libcxx/include/memory b/libcxx/include/memory
index 83046f67753c2..47134a052c0a7 100644
--- a/libcxx/include/memory
+++ b/libcxx/include/memory
@@ -887,7 +887,7 @@ template<size_t N, class T>
 #include <typeinfo>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <iterator>
 #  include <utility>
 #endif

diff  --git a/libcxx/include/mutex b/libcxx/include/mutex
index 23007b19e8b85..a8334ba341805 100644
--- a/libcxx/include/mutex
+++ b/libcxx/include/mutex
@@ -198,7 +198,7 @@ template<class Callable, class ...Args>
 #endif
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <functional>
 #endif
 

diff  --git a/libcxx/include/numeric b/libcxx/include/numeric
index 057faf508e6b7..ba030aadbfef5 100644
--- a/libcxx/include/numeric
+++ b/libcxx/include/numeric
@@ -163,7 +163,7 @@ template<class T>
 #include <__numeric/transform_inclusive_scan.h>
 #include <__numeric/transform_reduce.h>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <functional>
 #  include <iterator>
 #endif

diff  --git a/libcxx/include/optional b/libcxx/include/optional
index 865a71781708a..d75b1fefde77f 100644
--- a/libcxx/include/optional
+++ b/libcxx/include/optional
@@ -177,9 +177,12 @@ template<class T>
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 17
+#  include <chrono> // IGNORE-CYCLE due to <format>
+#endif
+
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <atomic>
-#  include <chrono>
 #  include <climits>
 #  include <concepts>
 #  include <ctime>

diff  --git a/libcxx/include/ostream b/libcxx/include/ostream
index 59f7de673df6a..216e58317db4a 100644
--- a/libcxx/include/ostream
+++ b/libcxx/include/ostream
@@ -171,7 +171,7 @@ basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, cons
 #include <streambuf>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <iterator>
 #endif
 

diff  --git a/libcxx/include/random b/libcxx/include/random
index 41ee4d85fda39..1193d0d1d4a31 100644
--- a/libcxx/include/random
+++ b/libcxx/include/random
@@ -1718,7 +1718,7 @@ class piecewise_linear_distribution
 #include <__random/weibull_distribution.h>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <algorithm>
 #endif
 

diff  --git a/libcxx/include/regex b/libcxx/include/regex
index 8361b41321e67..38998924c6b2a 100644
--- a/libcxx/include/regex
+++ b/libcxx/include/regex
@@ -778,7 +778,7 @@ typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator;
 #include <vector>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <iterator>
 #  include <utility>
 #endif

diff  --git a/libcxx/include/set b/libcxx/include/set
index da62f6f5ca5b5..f97ae2ab099e4 100644
--- a/libcxx/include/set
+++ b/libcxx/include/set
@@ -485,7 +485,7 @@ erase_if(multiset<Key, Compare, Allocator>& c, Predicate pred);  // C++20
 #include <__utility/forward.h>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <functional>
 #  include <iterator>
 #endif

diff  --git a/libcxx/include/span b/libcxx/include/span
index 0f4e0c501c74d..190c441fabc7b 100644
--- a/libcxx/include/span
+++ b/libcxx/include/span
@@ -148,7 +148,7 @@ template<class R>
 #include <type_traits>  // for remove_cv, etc
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <functional>
 #  include <iterator>
 #endif

diff  --git a/libcxx/include/stack b/libcxx/include/stack
index 86435c4559de1..a4a76e5178b40 100644
--- a/libcxx/include/stack
+++ b/libcxx/include/stack
@@ -107,7 +107,7 @@ template <class T, class Container>
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <functional>
 #endif
 

diff  --git a/libcxx/include/string b/libcxx/include/string
index 2180f86f0e0b5..1ee0cdc51d5f7 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -569,7 +569,7 @@ basic_string<char32_t> operator "" s( const char32_t *str, size_t len );
 #  include <cwchar>
 #endif
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <algorithm>
 #  include <functional>
 #  include <iterator>

diff  --git a/libcxx/include/string_view b/libcxx/include/string_view
index d0c70a20fb38d..a964f13ab8d01 100644
--- a/libcxx/include/string_view
+++ b/libcxx/include/string_view
@@ -224,7 +224,7 @@ namespace std {
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <algorithm>
 #  include <functional>
 #  include <iterator>

diff  --git a/libcxx/include/thread b/libcxx/include/thread
index 8b8699271eeec..85a845c2b223a 100644
--- a/libcxx/include/thread
+++ b/libcxx/include/thread
@@ -99,8 +99,11 @@ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
-#  include <chrono>
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 17
+#  include <chrono> // IGNORE-CYCLE due to <format>
+#endif
+
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <functional>
 #endif
 

diff  --git a/libcxx/include/tuple b/libcxx/include/tuple
index 2c729455cac28..01c59b3b3ea3a 100644
--- a/libcxx/include/tuple
+++ b/libcxx/include/tuple
@@ -220,7 +220,7 @@ template <class... Types>
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <exception>
 #  include <iosfwd>
 #  include <new>

diff  --git a/libcxx/include/typeindex b/libcxx/include/typeindex
index 6b2a78ec8cb11..d1b750d334b30 100644
--- a/libcxx/include/typeindex
+++ b/libcxx/include/typeindex
@@ -51,7 +51,7 @@ struct hash<type_index>
 #include <typeinfo>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <iosfwd>
 #  include <new>
 #  include <utility>

diff  --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map
index ebe218076d8b9..07312453ccbbb 100644
--- a/libcxx/include/unordered_map
+++ b/libcxx/include/unordered_map
@@ -531,7 +531,7 @@ template <class Key, class T, class Hash, class Pred, class Alloc>
 #include <tuple>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <algorithm>
 #  include <bit>
 #  include <iterator>

diff  --git a/libcxx/include/unordered_set b/libcxx/include/unordered_set
index c3a3bc8107f46..e294885253012 100644
--- a/libcxx/include/unordered_set
+++ b/libcxx/include/unordered_set
@@ -474,7 +474,7 @@ template <class Value, class Hash, class Pred, class Alloc>
 #include <__utility/forward.h>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <functional>
 #  include <iterator>
 #endif

diff  --git a/libcxx/include/utility b/libcxx/include/utility
index 7a1a45e334a35..9462b833b07c5 100644
--- a/libcxx/include/utility
+++ b/libcxx/include/utility
@@ -243,7 +243,7 @@ template <class T>
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <iosfwd>
 #endif
 

diff  --git a/libcxx/include/valarray b/libcxx/include/valarray
index 6f8a3b84197be..b47807cc69dd5 100644
--- a/libcxx/include/valarray
+++ b/libcxx/include/valarray
@@ -360,7 +360,7 @@ template <class T> unspecified2 end(const valarray<T>& v);
 #include <new>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <algorithm>
 #  include <functional>
 #endif

diff  --git a/libcxx/include/variant b/libcxx/include/variant
index e6988f3c1710e..7f8bb4170e394 100644
--- a/libcxx/include/variant
+++ b/libcxx/include/variant
@@ -228,7 +228,7 @@ namespace std {
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <typeinfo>
 #  include <utility>
 #endif

diff  --git a/libcxx/include/vector b/libcxx/include/vector
index 87eb56c8ae9f0..0786a516b3b8e 100644
--- a/libcxx/include/vector
+++ b/libcxx/include/vector
@@ -307,7 +307,7 @@ erase_if(vector<T, Allocator>& c, Predicate pred);    // C++20
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <algorithm>
 #  include <typeinfo>
 #  include <utility>

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.algorithm b/libcxx/test/libcxx/transitive_includes/cxx20/expected.algorithm
index 944a3eeea2d64..f8ccff41c2bb1 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.algorithm
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.algorithm
@@ -1,7 +1,6 @@
 algorithm
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.any b/libcxx/test/libcxx/transitive_includes/cxx20/expected.any
index 86009188e53e3..54d38834515bd 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.any
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.any
@@ -1,6 +1,5 @@
 any
 atomic
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.array b/libcxx/test/libcxx/transitive_includes/cxx20/expected.array
index 7145642a8f46e..ce0091420b9b0 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.array
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.array
@@ -2,7 +2,6 @@ algorithm
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.atomic b/libcxx/test/libcxx/transitive_includes/cxx20/expected.atomic
index 3e9917b3da1a0..a211832b18bbe 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.atomic
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.atomic
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.barrier b/libcxx/test/libcxx/transitive_includes/cxx20/expected.barrier
index c2865c8d3ef09..883919aa7d768 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.barrier
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.barrier
@@ -1,6 +1,5 @@
 atomic
 barrier
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.bitset b/libcxx/test/libcxx/transitive_includes/cxx20/expected.bitset
index 3cf3e8dbdfc73..a85bd53914e77 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.bitset
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.bitset
@@ -4,7 +4,6 @@ atomic
 bit
 bitset
 cctype
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.ccomplex b/libcxx/test/libcxx/transitive_includes/cxx20/expected.ccomplex
index 98bf9a8010e40..498d5a1ff0795 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.ccomplex
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.ccomplex
@@ -6,7 +6,6 @@ bitset
 ccomplex
 cctype
 cerrno
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.codecvt b/libcxx/test/libcxx/transitive_includes/cxx20/expected.codecvt
index 0931ca137c0bd..5c7efd549f69b 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.codecvt
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.codecvt
@@ -4,7 +4,6 @@ atomic
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 codecvt

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.complex b/libcxx/test/libcxx/transitive_includes/cxx20/expected.complex
index 64161c1d331fe..7b2a43f3ec9f4 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.complex
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.complex
@@ -5,7 +5,6 @@ bit
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.condition_variable b/libcxx/test/libcxx/transitive_includes/cxx20/expected.condition_variable
index 968007a37cef8..c3a60ae3ae54a 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.condition_variable
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.condition_variable
@@ -4,7 +4,6 @@ atomic
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.ctgmath b/libcxx/test/libcxx/transitive_includes/cxx20/expected.ctgmath
index 7467a5ab59520..727591312a69b 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.ctgmath
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.ctgmath
@@ -6,7 +6,6 @@ bitset
 ccomplex
 cctype
 cerrno
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.deque b/libcxx/test/libcxx/transitive_includes/cxx20/expected.deque
index c26bdc7479b64..e3144557aa464 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.deque
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.deque
@@ -2,7 +2,6 @@ algorithm
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_algorithm b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_algorithm
index 8a5cd7de65d88..dfebf4878e7b7 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_algorithm
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_algorithm
@@ -1,7 +1,6 @@
 algorithm
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_coroutine b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_coroutine
index 682f0fa0e7a83..b7344ece8f952 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_coroutine
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_coroutine
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_deque b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_deque
index bd86d1588beb1..961599b9bc6c9 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_deque
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_deque
@@ -2,7 +2,6 @@ algorithm
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_forward_list b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_forward_list
index c43fab08b41f3..fe3c906fa4808 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_forward_list
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_forward_list
@@ -2,7 +2,6 @@ algorithm
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_functional b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_functional
index 87cee2d288827..689ccf1c6a27e 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_functional
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_functional
@@ -2,7 +2,6 @@ algorithm
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_list b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_list
index ac800654f5323..5adfb13181ecb 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_list
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_list
@@ -2,7 +2,6 @@ algorithm
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_map b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_map
index d132098b01a1b..880a23b98e427 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_map
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_map
@@ -2,7 +2,6 @@ algorithm
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_memory_resource b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_memory_resource
index 94d9abd26b6cb..b5ff253cbacfc 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_memory_resource
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_memory_resource
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_regex b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_regex
index 8a49aac962c25..f91eef1d7a562 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_regex
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_regex
@@ -4,7 +4,6 @@ atomic
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_set b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_set
index f1d2953360dc6..5558bc67e5d04 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_set
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_set
@@ -2,7 +2,6 @@ algorithm
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_simd b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_simd
index f06f6e9cea012..74f77f65c7242 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_simd
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_simd
@@ -2,7 +2,6 @@ algorithm
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_string b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_string
index 367a9ed7da4bb..bb7e551ff70b7 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_string
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_string
@@ -3,7 +3,6 @@ array
 atomic
 bit
 cctype
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_unordered_map b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_unordered_map
index 16753ae30a7b3..3614946ae032a 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_unordered_map
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_unordered_map
@@ -2,7 +2,6 @@ algorithm
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_unordered_set b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_unordered_set
index 1aafa61386b74..0a77898c1e0bf 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_unordered_set
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_unordered_set
@@ -2,7 +2,6 @@ algorithm
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_vector b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_vector
index 1c569628be18e..ffd37e1ee6740 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_vector
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.experimental_vector
@@ -1,7 +1,6 @@
 algorithm
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.ext_hash_map b/libcxx/test/libcxx/transitive_includes/cxx20/expected.ext_hash_map
index 459536294e0c1..e199190cbfb00 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.ext_hash_map
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.ext_hash_map
@@ -3,7 +3,6 @@ array
 atomic
 bit
 cctype
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.ext_hash_set b/libcxx/test/libcxx/transitive_includes/cxx20/expected.ext_hash_set
index 160335aab3676..2a3d11e6ff40c 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.ext_hash_set
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.ext_hash_set
@@ -3,7 +3,6 @@ array
 atomic
 bit
 cctype
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.filesystem b/libcxx/test/libcxx/transitive_includes/cxx20/expected.filesystem
index 22e80bc111922..02157ec5aa54d 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.filesystem
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.filesystem
@@ -5,7 +5,6 @@ bit
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.format b/libcxx/test/libcxx/transitive_includes/cxx20/expected.format
index 08d46d27a9c04..595b589ef93f0 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.format
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.format
@@ -5,7 +5,6 @@ bit
 cctype
 cerrno
 charconv
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.forward_list b/libcxx/test/libcxx/transitive_includes/cxx20/expected.forward_list
index 33afc74bd420a..dde7fba4779c2 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.forward_list
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.forward_list
@@ -2,7 +2,6 @@ algorithm
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.fstream b/libcxx/test/libcxx/transitive_includes/cxx20/expected.fstream
index 7a892e11bfe61..7b14b7cf4e9a4 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.fstream
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.fstream
@@ -5,7 +5,6 @@ bit
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.functional b/libcxx/test/libcxx/transitive_includes/cxx20/expected.functional
index 7625982373f82..243ba6b8ea533 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.functional
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.functional
@@ -2,7 +2,6 @@ algorithm
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.future b/libcxx/test/libcxx/transitive_includes/cxx20/expected.future
index 92bd4e044ecc3..148b1eabe0d8c 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.future
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.future
@@ -4,7 +4,6 @@ atomic
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.iomanip b/libcxx/test/libcxx/transitive_includes/cxx20/expected.iomanip
index 39829086f4cb1..fd992145bd1f3 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.iomanip
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.iomanip
@@ -5,7 +5,6 @@ bit
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.ios b/libcxx/test/libcxx/transitive_includes/cxx20/expected.ios
index 6e7e5b2689767..b2eec45518af9 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.ios
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.ios
@@ -4,7 +4,6 @@ atomic
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.iostream b/libcxx/test/libcxx/transitive_includes/cxx20/expected.iostream
index 580aeaf867341..c743a03d7f7b3 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.iostream
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.iostream
@@ -5,7 +5,6 @@ bit
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.istream b/libcxx/test/libcxx/transitive_includes/cxx20/expected.istream
index fd0c4b4ca7361..cd2a2f405afb9 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.istream
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.istream
@@ -5,7 +5,6 @@ bit
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.latch b/libcxx/test/libcxx/transitive_includes/cxx20/expected.latch
index a7a6bbc912cef..ad8a92a309504 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.latch
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.latch
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.list b/libcxx/test/libcxx/transitive_includes/cxx20/expected.list
index b596079c340b0..e13c604d6a1c3 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.list
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.list
@@ -2,7 +2,6 @@ algorithm
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.locale b/libcxx/test/libcxx/transitive_includes/cxx20/expected.locale
index 29719367689e4..456f5a21cd675 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.locale
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.locale
@@ -4,7 +4,6 @@ atomic
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.map b/libcxx/test/libcxx/transitive_includes/cxx20/expected.map
index c871579ea35ed..bc84d668429c7 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.map
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.map
@@ -2,7 +2,6 @@ algorithm
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.memory b/libcxx/test/libcxx/transitive_includes/cxx20/expected.memory
index f36910fde696d..db28f1f58dd4c 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.memory
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.memory
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.mutex b/libcxx/test/libcxx/transitive_includes/cxx20/expected.mutex
index 4d101cb290c16..dcaffb654be30 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.mutex
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.mutex
@@ -4,7 +4,6 @@ atomic
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.numeric b/libcxx/test/libcxx/transitive_includes/cxx20/expected.numeric
index 558b32457eb4c..2597d54ce83f2 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.numeric
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.numeric
@@ -2,7 +2,6 @@ algorithm
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.optional b/libcxx/test/libcxx/transitive_includes/cxx20/expected.optional
index 993ce23d8009d..6b236d30066e8 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.optional
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.optional
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.ostream b/libcxx/test/libcxx/transitive_includes/cxx20/expected.ostream
index 762d13c26ac3c..c5cea41f9f069 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.ostream
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.ostream
@@ -5,7 +5,6 @@ bit
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.queue b/libcxx/test/libcxx/transitive_includes/cxx20/expected.queue
index 5861852fc5322..a9915f611df68 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.queue
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.queue
@@ -2,7 +2,6 @@ algorithm
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.random b/libcxx/test/libcxx/transitive_includes/cxx20/expected.random
index 96a956ad800a1..f61748b1a301c 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.random
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.random
@@ -3,7 +3,6 @@ array
 atomic
 bit
 cctype
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.ranges b/libcxx/test/libcxx/transitive_includes/cxx20/expected.ranges
index 3dbb13bb9680f..228747c4026b8 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.ranges
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.ranges
@@ -2,7 +2,6 @@ algorithm
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.regex b/libcxx/test/libcxx/transitive_includes/cxx20/expected.regex
index 76df207366621..7dfb8e6684618 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.regex
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.regex
@@ -4,7 +4,6 @@ atomic
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.scoped_allocator b/libcxx/test/libcxx/transitive_includes/cxx20/expected.scoped_allocator
index 22dcb319a5e67..22b72aa76685b 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.scoped_allocator
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.scoped_allocator
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.semaphore b/libcxx/test/libcxx/transitive_includes/cxx20/expected.semaphore
index d6802e25aa70d..5d6f0da391d0c 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.semaphore
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.semaphore
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.set b/libcxx/test/libcxx/transitive_includes/cxx20/expected.set
index 849e87331b725..f41727fc4a568 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.set
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.set
@@ -2,7 +2,6 @@ algorithm
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.shared_mutex b/libcxx/test/libcxx/transitive_includes/cxx20/expected.shared_mutex
index fdea61e19bba8..1372d40d24707 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.shared_mutex
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.shared_mutex
@@ -4,7 +4,6 @@ atomic
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.span b/libcxx/test/libcxx/transitive_includes/cxx20/expected.span
index a46c30df88516..96d634628cbfb 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.span
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.span
@@ -2,7 +2,6 @@ algorithm
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.sstream b/libcxx/test/libcxx/transitive_includes/cxx20/expected.sstream
index 1724fbdde39ed..00e0758f4cced 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.sstream
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.sstream
@@ -5,7 +5,6 @@ bit
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.stack b/libcxx/test/libcxx/transitive_includes/cxx20/expected.stack
index 1a7d18cb85f24..21de647a7b6da 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.stack
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.stack
@@ -2,7 +2,6 @@ algorithm
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.streambuf b/libcxx/test/libcxx/transitive_includes/cxx20/expected.streambuf
index a3001ce44a1bb..fa7e9ba84a376 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.streambuf
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.streambuf
@@ -4,7 +4,6 @@ atomic
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.string b/libcxx/test/libcxx/transitive_includes/cxx20/expected.string
index 0dacf739a7859..b90a8c85d103f 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.string
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.string
@@ -3,7 +3,6 @@ array
 atomic
 bit
 cctype
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.string_view b/libcxx/test/libcxx/transitive_includes/cxx20/expected.string_view
index e814351725ef2..8b80b5bc5be53 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.string_view
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.string_view
@@ -3,7 +3,6 @@ array
 atomic
 bit
 cctype
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.strstream b/libcxx/test/libcxx/transitive_includes/cxx20/expected.strstream
index 782153b595b63..9ebf526c6ae56 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.strstream
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.strstream
@@ -5,7 +5,6 @@ bit
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.system_error b/libcxx/test/libcxx/transitive_includes/cxx20/expected.system_error
index 4101ee5209a39..1afa1e305c66d 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.system_error
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.system_error
@@ -4,7 +4,6 @@ atomic
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.thread b/libcxx/test/libcxx/transitive_includes/cxx20/expected.thread
index ab8c3c7c85ba2..e314e55945371 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.thread
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.thread
@@ -4,7 +4,6 @@ atomic
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.unordered_map b/libcxx/test/libcxx/transitive_includes/cxx20/expected.unordered_map
index 2250cf96690a3..0d226147d5151 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.unordered_map
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.unordered_map
@@ -1,7 +1,6 @@
 algorithm
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.unordered_set b/libcxx/test/libcxx/transitive_includes/cxx20/expected.unordered_set
index 9352f0b05b721..44f4fd5840052 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.unordered_set
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.unordered_set
@@ -2,7 +2,6 @@ algorithm
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.valarray b/libcxx/test/libcxx/transitive_includes/cxx20/expected.valarray
index a069f37119fa8..445b715ab6e90 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.valarray
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.valarray
@@ -2,7 +2,6 @@ algorithm
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx20/expected.vector b/libcxx/test/libcxx/transitive_includes/cxx20/expected.vector
index 5fb9d7d19cc12..9fbca5e0516d4 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20/expected.vector
+++ b/libcxx/test/libcxx/transitive_includes/cxx20/expected.vector
@@ -1,7 +1,6 @@
 algorithm
 atomic
 bit
-chrono
 climits
 cmath
 compare

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.algorithm b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.algorithm
index 944a3eeea2d64..8e539be98cbcc 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.algorithm
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.algorithm
@@ -1,7 +1,6 @@
 algorithm
 atomic
 bit
-chrono
 climits
 cmath
 compare
@@ -14,7 +13,6 @@ ctime
 exception
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -23,6 +21,4 @@ stdexcept
 tuple
 type_traits
 typeinfo
-utility
-variant
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.any b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.any
index 86009188e53e3..4f3cff5c06341 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.any
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.any
@@ -1,6 +1,5 @@
 any
 atomic
-chrono
 climits
 cmath
 compare
@@ -13,7 +12,6 @@ ctime
 exception
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -22,6 +20,4 @@ stdexcept
 tuple
 type_traits
 typeinfo
-utility
-variant
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.array b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.array
index 7145642a8f46e..0fb1b67d13d02 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.array
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.array
@@ -1,29 +1,14 @@
-algorithm
 array
-atomic
-bit
-chrono
-climits
 cmath
 compare
 concepts
 cstddef
 cstdint
 cstdlib
-cstring
-ctime
 exception
 initializer_list
 iosfwd
-iterator
 limits
-memory
-new
-ratio
 stdexcept
-tuple
 type_traits
-typeinfo
-utility
-variant
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.atomic b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.atomic
index 3e9917b3da1a0..42e3c191ac896 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.atomic
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.atomic
@@ -1,8 +1,5 @@
 atomic
-chrono
 climits
-cmath
-compare
 cstddef
 cstdint
 cstring

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.barrier b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.barrier
index c2865c8d3ef09..cb7845f45e0c1 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.barrier
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.barrier
@@ -1,6 +1,5 @@
 atomic
 barrier
-chrono
 climits
 cmath
 compare
@@ -13,7 +12,6 @@ ctime
 exception
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -22,6 +20,4 @@ stdexcept
 tuple
 type_traits
 typeinfo
-utility
-variant
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.bit b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.bit
index 4fb5285f8142e..3f58643d60625 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.bit
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.bit
@@ -2,7 +2,6 @@ bit
 cstddef
 cstdint
 cstdlib
-iosfwd
 limits
 type_traits
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.bitset b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.bitset
index 3cf3e8dbdfc73..d3ee4af66e1b9 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.bitset
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.bitset
@@ -1,10 +1,6 @@
-algorithm
-array
 atomic
-bit
 bitset
 cctype
-chrono
 climits
 cmath
 compare
@@ -18,14 +14,11 @@ ctime
 cwchar
 cwctype
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
-optional
 ratio
 stdexcept
 string
@@ -33,8 +26,4 @@ string_view
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ccomplex b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ccomplex
index 98bf9a8010e40..cfc2d04436fef 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ccomplex
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ccomplex
@@ -1,12 +1,8 @@
-algorithm
-array
 atomic
-bit
 bitset
 ccomplex
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
@@ -22,18 +18,15 @@ ctime
 cwchar
 cwctype
 exception
-functional
 initializer_list
 ios
 iosfwd
 istream
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ostream
 ratio
 sstream
@@ -45,8 +38,4 @@ system_error
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.charconv b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.charconv
index 1ab0e5d37a401..448fc06daf921 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.charconv
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.charconv
@@ -7,7 +7,6 @@ cstdint
 cstdlib
 cstring
 initializer_list
-iosfwd
 limits
 type_traits
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.codecvt b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.codecvt
index 0931ca137c0bd..f846715edf800 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.codecvt
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.codecvt
@@ -1,10 +1,6 @@
-algorithm
-array
 atomic
-bit
 cctype
 cerrno
-chrono
 climits
 cmath
 codecvt
@@ -19,15 +15,12 @@ ctime
 cwchar
 cwctype
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 mutex
 new
-optional
 ratio
 stdexcept
 string
@@ -36,8 +29,4 @@ system_error
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.complex b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.complex
index 64161c1d331fe..eb5fe7c87bf7a 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.complex
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.complex
@@ -1,11 +1,7 @@
-algorithm
-array
 atomic
-bit
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
@@ -21,18 +17,15 @@ ctime
 cwchar
 cwctype
 exception
-functional
 initializer_list
 ios
 iosfwd
 istream
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ostream
 ratio
 sstream
@@ -44,8 +37,4 @@ system_error
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.condition_variable b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.condition_variable
index 968007a37cef8..081849db56d28 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.condition_variable
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.condition_variable
@@ -1,10 +1,6 @@
-algorithm
-array
 atomic
-bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
@@ -19,14 +15,11 @@ ctime
 cwchar
 cwctype
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
-optional
 ratio
 stdexcept
 string
@@ -35,8 +28,4 @@ system_error
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.coroutine b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.coroutine
index 8dd332d472542..1f31012bf5be6 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.coroutine
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.coroutine
@@ -4,7 +4,6 @@ coroutine
 cstddef
 cstdint
 cstring
-iosfwd
 limits
 type_traits
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ctgmath b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ctgmath
index 7467a5ab59520..ac37b74ac56e2 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ctgmath
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ctgmath
@@ -1,12 +1,8 @@
-algorithm
-array
 atomic
-bit
 bitset
 ccomplex
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
@@ -23,18 +19,15 @@ ctime
 cwchar
 cwctype
 exception
-functional
 initializer_list
 ios
 iosfwd
 istream
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ostream
 ratio
 sstream
@@ -46,8 +39,4 @@ system_error
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.deque b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.deque
index c26bdc7479b64..aa51131432eac 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.deque
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.deque
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -14,21 +10,14 @@ cstring
 ctime
 deque
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
-optional
 ratio
 stdexcept
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_algorithm b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_algorithm
index 8a5cd7de65d88..7e307913a9fe4 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_algorithm
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_algorithm
@@ -1,7 +1,6 @@
 algorithm
 atomic
 bit
-chrono
 climits
 cmath
 compare
@@ -15,7 +14,6 @@ exception
 experimental/algorithm
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -24,6 +22,4 @@ stdexcept
 tuple
 type_traits
 typeinfo
-utility
-variant
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_coroutine b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_coroutine
index 682f0fa0e7a83..89fc3edcec46d 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_coroutine
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_coroutine
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare
@@ -13,7 +12,6 @@ exception
 experimental/coroutine
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -22,6 +20,4 @@ stdexcept
 tuple
 type_traits
 typeinfo
-utility
-variant
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_deque b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_deque
index bd86d1588beb1..e1677c7dd843b 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_deque
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_deque
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -17,21 +13,15 @@ exception
 experimental/deque
 experimental/memory_resource
 experimental/utility
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
-optional
 ratio
 stdexcept
 tuple
 type_traits
 typeinfo
-unordered_map
 utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_forward_list b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_forward_list
index c43fab08b41f3..af433ce909496 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_forward_list
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_forward_list
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -17,21 +13,15 @@ experimental/forward_list
 experimental/memory_resource
 experimental/utility
 forward_list
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
-optional
 ratio
 stdexcept
 tuple
 type_traits
 typeinfo
-unordered_map
 utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_functional b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_functional
index 87cee2d288827..ce502b5e98035 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_functional
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_functional
@@ -1,8 +1,5 @@
-algorithm
 array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -17,7 +14,6 @@ experimental/functional
 functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -28,7 +24,5 @@ tuple
 type_traits
 typeinfo
 unordered_map
-utility
-variant
 vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_iterator b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_iterator
index 14d31c215ffb7..83a9b8d93c65e 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_iterator
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_iterator
@@ -14,7 +14,5 @@ limits
 new
 tuple
 type_traits
-typeinfo
-utility
 variant
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_list b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_list
index ac800654f5323..aae9f23d08e97 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_list
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_list
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -16,22 +12,16 @@ exception
 experimental/list
 experimental/memory_resource
 experimental/utility
-functional
 initializer_list
 iosfwd
-iterator
 limits
 list
 memory
 new
-optional
 ratio
 stdexcept
 tuple
 type_traits
 typeinfo
-unordered_map
 utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_map b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_map
index d132098b01a1b..cb76c7642ec9c 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_map
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_map
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -16,10 +12,8 @@ exception
 experimental/map
 experimental/memory_resource
 experimental/utility
-functional
 initializer_list
 iosfwd
-iterator
 limits
 map
 memory
@@ -30,8 +24,5 @@ stdexcept
 tuple
 type_traits
 typeinfo
-unordered_map
 utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_memory_resource b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_memory_resource
index 94d9abd26b6cb..67d2441ae3691 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_memory_resource
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_memory_resource
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare
@@ -14,7 +13,6 @@ experimental/memory_resource
 experimental/utility
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -24,5 +22,4 @@ tuple
 type_traits
 typeinfo
 utility
-variant
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_regex b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_regex
index 8a49aac962c25..6490adb5a1b4e 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_regex
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_regex
@@ -1,10 +1,6 @@
-algorithm
-array
 atomic
-bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
@@ -23,15 +19,12 @@ experimental/memory_resource
 experimental/regex
 experimental/string
 experimental/utility
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 mutex
 new
-optional
 ratio
 regex
 stdexcept
@@ -41,8 +34,6 @@ system_error
 tuple
 type_traits
 typeinfo
-unordered_map
 utility
-variant
 vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_set b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_set
index f1d2953360dc6..03a09aff0574b 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_set
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_set
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -16,10 +12,8 @@ exception
 experimental/memory_resource
 experimental/set
 experimental/utility
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -30,8 +24,5 @@ stdexcept
 tuple
 type_traits
 typeinfo
-unordered_map
 utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_simd b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_simd
index f06f6e9cea012..999b0aafb666a 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_simd
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_simd
@@ -1,34 +1,16 @@
-algorithm
 array
-atomic
-bit
-chrono
-climits
 cmath
 compare
 concepts
 cstddef
 cstdint
 cstdlib
-cstring
-ctime
 exception
 experimental/simd
-functional
 initializer_list
 iosfwd
-iterator
 limits
-memory
-new
-optional
-ratio
 stdexcept
 tuple
 type_traits
-typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_string b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_string
index 367a9ed7da4bb..4fb05391c7b46 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_string
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_string
@@ -1,9 +1,5 @@
-algorithm
-array
 atomic
-bit
 cctype
-chrono
 climits
 cmath
 compare
@@ -20,14 +16,11 @@ exception
 experimental/memory_resource
 experimental/string
 experimental/utility
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
-optional
 ratio
 stdexcept
 string
@@ -35,8 +28,5 @@ string_view
 tuple
 type_traits
 typeinfo
-unordered_map
 utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_unordered_map b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_unordered_map
index 16753ae30a7b3..04efa3377d816 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_unordered_map
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_unordered_map
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -16,10 +12,8 @@ exception
 experimental/memory_resource
 experimental/unordered_map
 experimental/utility
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -31,6 +25,4 @@ type_traits
 typeinfo
 unordered_map
 utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_unordered_set b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_unordered_set
index 1aafa61386b74..798b920506cfa 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_unordered_set
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_unordered_set
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -16,10 +12,8 @@ exception
 experimental/memory_resource
 experimental/unordered_set
 experimental/utility
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -29,9 +23,6 @@ stdexcept
 tuple
 type_traits
 typeinfo
-unordered_map
 unordered_set
 utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_utility b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_utility
index a399b3ebb27c6..788283fb30b9c 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_utility
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_utility
@@ -5,7 +5,6 @@ cstdint
 cstdlib
 experimental/utility
 initializer_list
-iosfwd
 limits
 type_traits
 utility

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_vector b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_vector
index 1c569628be18e..35355e4d3547e 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_vector
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.experimental_vector
@@ -1,7 +1,4 @@
-algorithm
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -17,7 +14,6 @@ experimental/utility
 experimental/vector
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -27,6 +23,5 @@ tuple
 type_traits
 typeinfo
 utility
-variant
 vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ext_hash_map b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ext_hash_map
index 459536294e0c1..238ba8fade717 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ext_hash_map
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ext_hash_map
@@ -3,7 +3,6 @@ array
 atomic
 bit
 cctype
-chrono
 climits
 cmath
 compare
@@ -21,7 +20,6 @@ ext/hash_map
 functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -34,7 +32,5 @@ tuple
 type_traits
 typeinfo
 unordered_map
-utility
-variant
 vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ext_hash_set b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ext_hash_set
index 160335aab3676..5e58c46663a50 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ext_hash_set
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ext_hash_set
@@ -3,7 +3,6 @@ array
 atomic
 bit
 cctype
-chrono
 climits
 cmath
 compare
@@ -21,7 +20,6 @@ ext/hash_set
 functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -34,7 +32,5 @@ tuple
 type_traits
 typeinfo
 unordered_map
-utility
-variant
 vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.filesystem b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.filesystem
index 22e80bc111922..adc5812121df0 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.filesystem
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.filesystem
@@ -1,11 +1,7 @@
-algorithm
-array
 atomic
-bit
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
@@ -21,19 +17,16 @@ cwchar
 cwctype
 exception
 filesystem
-functional
 initializer_list
 iomanip
 ios
 iosfwd
 istream
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ostream
 ratio
 stdexcept
@@ -44,8 +37,4 @@ system_error
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.format b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.format
index 08d46d27a9c04..d88f3f66919f8 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.format
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.format
@@ -1,11 +1,9 @@
-algorithm
 array
 atomic
 bit
 cctype
 cerrno
 charconv
-chrono
 climits
 cmath
 compare
@@ -21,11 +19,9 @@ cwchar
 cwctype
 exception
 format
-functional
 initializer_list
 ios
 iosfwd
-iterator
 limits
 locale
 memory
@@ -41,8 +37,4 @@ system_error
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.forward_list b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.forward_list
index 33afc74bd420a..de184d39a0dae 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.forward_list
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.forward_list
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -14,21 +10,14 @@ cstring
 ctime
 exception
 forward_list
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
-optional
 ratio
 stdexcept
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.fstream b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.fstream
index 7a892e11bfe61..31ef4da046304 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.fstream
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.fstream
@@ -1,11 +1,7 @@
-algorithm
-array
 atomic
-bit
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
@@ -22,19 +18,16 @@ cwctype
 exception
 filesystem
 fstream
-functional
 initializer_list
 iomanip
 ios
 iosfwd
 istream
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ostream
 ratio
 stdexcept
@@ -45,8 +38,4 @@ system_error
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.functional b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.functional
index 7625982373f82..944f5a2cedd79 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.functional
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.functional
@@ -1,8 +1,5 @@
-algorithm
 array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -16,7 +13,6 @@ exception
 functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -27,7 +23,5 @@ tuple
 type_traits
 typeinfo
 unordered_map
-utility
-variant
 vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.future b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.future
index 92bd4e044ecc3..978baba9b8ecb 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.future
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.future
@@ -1,10 +1,6 @@
-algorithm
-array
 atomic
-bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
@@ -18,16 +14,13 @@ ctime
 cwchar
 cwctype
 exception
-functional
 future
 initializer_list
 iosfwd
-iterator
 limits
 memory
 mutex
 new
-optional
 ratio
 stdexcept
 string
@@ -37,8 +30,4 @@ thread
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.iomanip b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.iomanip
index 39829086f4cb1..86446ab031fbf 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.iomanip
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.iomanip
@@ -1,11 +1,7 @@
-algorithm
-array
 atomic
-bit
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
@@ -20,19 +16,16 @@ ctime
 cwchar
 cwctype
 exception
-functional
 initializer_list
 iomanip
 ios
 iosfwd
 istream
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ostream
 ratio
 stdexcept
@@ -43,8 +36,4 @@ system_error
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ios b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ios
index 6e7e5b2689767..3ecae9323ab41 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ios
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ios
@@ -1,10 +1,6 @@
-algorithm
-array
 atomic
-bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
@@ -18,16 +14,13 @@ ctime
 cwchar
 cwctype
 exception
-functional
 initializer_list
 ios
 iosfwd
-iterator
 limits
 memory
 mutex
 new
-optional
 ratio
 stdexcept
 string
@@ -36,8 +29,4 @@ system_error
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.iostream b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.iostream
index 580aeaf867341..2e4e74cc18b47 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.iostream
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.iostream
@@ -1,11 +1,7 @@
-algorithm
-array
 atomic
-bit
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
@@ -20,19 +16,16 @@ ctime
 cwchar
 cwctype
 exception
-functional
 initializer_list
 ios
 iosfwd
 iostream
 istream
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ostream
 ratio
 stdexcept
@@ -43,8 +36,4 @@ system_error
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.istream b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.istream
index fd0c4b4ca7361..cbd4a87c16134 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.istream
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.istream
@@ -1,11 +1,7 @@
-algorithm
-array
 atomic
-bit
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
@@ -20,18 +16,15 @@ ctime
 cwchar
 cwctype
 exception
-functional
 initializer_list
 ios
 iosfwd
 istream
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ostream
 ratio
 stdexcept
@@ -42,8 +35,4 @@ system_error
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.iterator b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.iterator
index 447087a3f6f96..698f6cf9de2f0 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.iterator
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.iterator
@@ -13,7 +13,5 @@ limits
 new
 tuple
 type_traits
-typeinfo
-utility
 variant
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.latch b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.latch
index a7a6bbc912cef..3d00941b92311 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.latch
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.latch
@@ -1,8 +1,5 @@
 atomic
-chrono
 climits
-cmath
-compare
 cstddef
 cstdint
 cstring

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.list b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.list
index b596079c340b0..96d4f33db7d4e 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.list
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.list
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -13,22 +9,15 @@ cstdlib
 cstring
 ctime
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 list
 memory
 new
-optional
 ratio
 stdexcept
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.locale b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.locale
index 29719367689e4..cdd6609f84403 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.locale
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.locale
@@ -1,10 +1,6 @@
-algorithm
-array
 atomic
-bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
@@ -19,17 +15,14 @@ ctime
 cwchar
 cwctype
 exception
-functional
 initializer_list
 ios
 iosfwd
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ratio
 stdexcept
 streambuf
@@ -39,8 +32,4 @@ system_error
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.map b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.map
index c871579ea35ed..a6896289ab3fd 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.map
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.map
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -13,10 +9,8 @@ cstdlib
 cstring
 ctime
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 map
 memory
@@ -27,8 +21,4 @@ stdexcept
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.memory b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.memory
index f36910fde696d..3b7a13de63fe8 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.memory
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.memory
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare
@@ -12,7 +11,6 @@ ctime
 exception
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -21,6 +19,4 @@ stdexcept
 tuple
 type_traits
 typeinfo
-utility
-variant
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.mutex b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.mutex
index 4d101cb290c16..1aa71f549fd49 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.mutex
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.mutex
@@ -1,10 +1,6 @@
-algorithm
-array
 atomic
-bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
@@ -18,15 +14,12 @@ ctime
 cwchar
 cwctype
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 mutex
 new
-optional
 ratio
 stdexcept
 string
@@ -35,8 +28,4 @@ system_error
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.numeric b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.numeric
index 558b32457eb4c..843582958e10f 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.numeric
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.numeric
@@ -1,34 +1,8 @@
-algorithm
-array
-atomic
-bit
-chrono
-climits
 cmath
-compare
 concepts
 cstddef
 cstdint
-cstdlib
-cstring
-ctime
-exception
-functional
-initializer_list
-iosfwd
-iterator
 limits
-memory
-new
 numeric
-optional
-ratio
-stdexcept
-tuple
 type_traits
-typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.optional b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.optional
index 993ce23d8009d..e888c8f4e0bd4 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.optional
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.optional
@@ -1,27 +1,15 @@
-atomic
-chrono
-climits
 cmath
 compare
-concepts
 cstddef
 cstdint
 cstdlib
 cstring
-ctime
 exception
 initializer_list
 iosfwd
-iterator
 limits
-memory
 new
 optional
-ratio
 stdexcept
-tuple
 type_traits
-typeinfo
-utility
-variant
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ostream b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ostream
index 762d13c26ac3c..1d7da3e2f96dc 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ostream
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ostream
@@ -1,11 +1,7 @@
-algorithm
-array
 atomic
-bit
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
@@ -20,17 +16,14 @@ ctime
 cwchar
 cwctype
 exception
-functional
 initializer_list
 ios
 iosfwd
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ostream
 ratio
 stdexcept
@@ -41,8 +34,4 @@ system_error
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.queue b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.queue
index 5861852fc5322..85fd646e834cf 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.queue
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.queue
@@ -1,8 +1,5 @@
-algorithm
 array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -17,7 +14,6 @@ exception
 functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -29,7 +25,5 @@ tuple
 type_traits
 typeinfo
 unordered_map
-utility
-variant
 vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.random b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.random
index 96a956ad800a1..c8060db2909ac 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.random
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.random
@@ -1,9 +1,6 @@
-algorithm
-array
 atomic
 bit
 cctype
-chrono
 climits
 cmath
 compare
@@ -17,15 +14,12 @@ ctime
 cwchar
 cwctype
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
 numeric
-optional
 random
 ratio
 stdexcept
@@ -34,8 +28,5 @@ string_view
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
 vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ranges b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ranges
index 3dbb13bb9680f..f16d5e5d55052 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ranges
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.ranges
@@ -1,9 +1,4 @@
-algorithm
 array
-atomic
-bit
-chrono
-climits
 cmath
 compare
 concepts
@@ -11,25 +6,17 @@ cstddef
 cstdint
 cstdlib
 cstring
-ctime
 exception
-functional
 initializer_list
 iosfwd
 iterator
 limits
-memory
 new
 optional
 ranges
-ratio
 span
 stdexcept
 tuple
 type_traits
-typeinfo
-unordered_map
-utility
 variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.regex b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.regex
index 76df207366621..447e31831d8fc 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.regex
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.regex
@@ -1,10 +1,6 @@
-algorithm
-array
 atomic
-bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
@@ -19,15 +15,12 @@ cwchar
 cwctype
 deque
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 mutex
 new
-optional
 ratio
 regex
 stdexcept
@@ -37,8 +30,5 @@ system_error
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
 vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.scoped_allocator b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.scoped_allocator
index 22dcb319a5e67..f4345de47a6ab 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.scoped_allocator
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.scoped_allocator
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare
@@ -12,7 +11,6 @@ ctime
 exception
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -22,6 +20,4 @@ stdexcept
 tuple
 type_traits
 typeinfo
-utility
-variant
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.semaphore b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.semaphore
index d6802e25aa70d..6893d09955064 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.semaphore
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.semaphore
@@ -1,8 +1,5 @@
 atomic
-chrono
 climits
-cmath
-compare
 cstddef
 cstdint
 cstring

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.set b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.set
index 849e87331b725..9b0f3cb52c187 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.set
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.set
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -13,10 +9,8 @@ cstdlib
 cstring
 ctime
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -27,8 +21,4 @@ stdexcept
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.shared_mutex b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.shared_mutex
index fdea61e19bba8..2bd4140b3d11c 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.shared_mutex
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.shared_mutex
@@ -1,10 +1,6 @@
-algorithm
-array
 atomic
-bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
@@ -18,14 +14,11 @@ ctime
 cwchar
 cwctype
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
-optional
 ratio
 shared_mutex
 stdexcept
@@ -35,8 +28,4 @@ system_error
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.span b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.span
index a46c30df88516..4ec98478d7ab6 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.span
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.span
@@ -1,34 +1,15 @@
-algorithm
 array
-atomic
-bit
-chrono
-climits
 cmath
 compare
 concepts
 cstddef
 cstdint
 cstdlib
-cstring
-ctime
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
-memory
-new
-optional
-ratio
 span
 stdexcept
-tuple
 type_traits
-typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.sstream b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.sstream
index 1724fbdde39ed..1acc28a14008e 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.sstream
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.sstream
@@ -1,11 +1,7 @@
-algorithm
-array
 atomic
-bit
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
@@ -20,18 +16,15 @@ ctime
 cwchar
 cwctype
 exception
-functional
 initializer_list
 ios
 iosfwd
 istream
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ostream
 ratio
 sstream
@@ -43,8 +36,4 @@ system_error
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.stack b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.stack
index 1a7d18cb85f24..17c8d991260c8 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.stack
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.stack
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -14,22 +10,15 @@ cstring
 ctime
 deque
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
-optional
 ratio
 stack
 stdexcept
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.streambuf b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.streambuf
index a3001ce44a1bb..5e8e278a70ff5 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.streambuf
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.streambuf
@@ -1,10 +1,6 @@
-algorithm
-array
 atomic
-bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
@@ -18,16 +14,13 @@ ctime
 cwchar
 cwctype
 exception
-functional
 initializer_list
 ios
 iosfwd
-iterator
 limits
 memory
 mutex
 new
-optional
 ratio
 stdexcept
 streambuf
@@ -37,8 +30,4 @@ system_error
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.string b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.string
index 0dacf739a7859..960707082bab5 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.string
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.string
@@ -1,9 +1,5 @@
-algorithm
-array
 atomic
-bit
 cctype
-chrono
 climits
 cmath
 compare
@@ -17,14 +13,11 @@ ctime
 cwchar
 cwctype
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
-optional
 ratio
 stdexcept
 string
@@ -32,8 +25,4 @@ string_view
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.string_view b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.string_view
index e814351725ef2..6bb7edfd0bf09 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.string_view
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.string_view
@@ -1,10 +1,4 @@
-algorithm
-array
-atomic
-bit
 cctype
-chrono
-climits
 cmath
 compare
 concepts
@@ -13,26 +7,13 @@ cstdint
 cstdio
 cstdlib
 cstring
-ctime
 cwchar
 cwctype
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
-memory
-new
-optional
-ratio
 stdexcept
 string_view
-tuple
 type_traits
-typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.strstream b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.strstream
index 782153b595b63..ed208f4d5eb37 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.strstream
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.strstream
@@ -1,11 +1,7 @@
-algorithm
-array
 atomic
-bit
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
@@ -20,18 +16,15 @@ ctime
 cwchar
 cwctype
 exception
-functional
 initializer_list
 ios
 iosfwd
 istream
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ostream
 ratio
 stdexcept
@@ -43,8 +36,4 @@ system_error
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.system_error b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.system_error
index 4101ee5209a39..30ca93cf23bdd 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.system_error
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.system_error
@@ -1,10 +1,6 @@
-algorithm
-array
 atomic
-bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
@@ -18,14 +14,11 @@ ctime
 cwchar
 cwctype
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
-optional
 ratio
 stdexcept
 string
@@ -34,8 +27,4 @@ system_error
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.thread b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.thread
index ab8c3c7c85ba2..102ca58917136 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.thread
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.thread
@@ -1,10 +1,6 @@
-algorithm
-array
 atomic
-bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
@@ -18,14 +14,11 @@ ctime
 cwchar
 cwctype
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
-optional
 ratio
 stdexcept
 string
@@ -35,8 +28,4 @@ thread
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.tuple b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.tuple
index 69858dc888c3b..2a4e44c6f4e91 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.tuple
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.tuple
@@ -2,14 +2,7 @@ cmath
 compare
 cstddef
 cstdint
-cstdlib
-exception
-initializer_list
-iosfwd
 limits
-new
 tuple
 type_traits
-typeinfo
-utility
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.typeindex b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.typeindex
index 8f1c652535378..8ed579013db7c 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.typeindex
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.typeindex
@@ -4,12 +4,8 @@ cstddef
 cstdint
 cstdlib
 exception
-initializer_list
-iosfwd
 limits
-new
 type_traits
 typeindex
 typeinfo
-utility
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.unordered_map b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.unordered_map
index 2250cf96690a3..4f2f2ff023885 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.unordered_map
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.unordered_map
@@ -1,7 +1,4 @@
-algorithm
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -14,7 +11,6 @@ ctime
 exception
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -25,6 +21,4 @@ tuple
 type_traits
 typeinfo
 unordered_map
-utility
-variant
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.unordered_set b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.unordered_set
index 9352f0b05b721..2c825fb58ac98 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.unordered_set
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.unordered_set
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -13,10 +9,8 @@ cstdlib
 cstring
 ctime
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -26,9 +20,5 @@ stdexcept
 tuple
 type_traits
 typeinfo
-unordered_map
 unordered_set
-utility
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.utility b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.utility
index 799a14724cf41..30781fff93362 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.utility
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.utility
@@ -4,7 +4,6 @@ cstddef
 cstdint
 cstdlib
 initializer_list
-iosfwd
 limits
 type_traits
 utility

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.valarray b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.valarray
index a069f37119fa8..b5543ea5c701d 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.valarray
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.valarray
@@ -1,34 +1,15 @@
-algorithm
-array
-atomic
-bit
-chrono
-climits
 cmath
-compare
 concepts
 cstddef
 cstdint
 cstdlib
 cstring
-ctime
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
-memory
 new
-optional
-ratio
 stdexcept
-tuple
 type_traits
-typeinfo
-unordered_map
-utility
 valarray
-variant
-vector
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.variant b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.variant
index d94d72974cb84..44553c77ce567 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.variant
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.variant
@@ -6,12 +6,9 @@ cstdlib
 cstring
 exception
 initializer_list
-iosfwd
 limits
 new
 tuple
 type_traits
-typeinfo
-utility
 variant
 version

diff  --git a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.vector b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.vector
index 5fb9d7d19cc12..9553eb0c04d73 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b/expected.vector
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b/expected.vector
@@ -1,7 +1,4 @@
-algorithm
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -14,7 +11,6 @@ ctime
 exception
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -23,7 +19,5 @@ stdexcept
 tuple
 type_traits
 typeinfo
-utility
-variant
 vector
 version

diff  --git a/libcxx/utils/graph_header_deps.py b/libcxx/utils/graph_header_deps.py
index 1fe0fcc6d19d9..871a9d6ca55e0 100755
--- a/libcxx/utils/graph_header_deps.py
+++ b/libcxx/utils/graph_header_deps.py
@@ -69,7 +69,15 @@ def locate_header_file(h, paths):
                 local_includes.append(m.group(1))
             m = re.match(r'\s*#\s*include\s+<([^>]*)>', line)
             if m is not None:
-                system_includes.append(m.group(1))
+                # Since libc++ keeps transitive includes guarded by the
+                # language version some cycles can be ignored. For example
+                # before C++20 several headers included <chrono> without using
+                # it. In C++20 <chrono> conditionally includes <format> in
+                # C++20. This causes multiple cycles in this script that can't
+                # happen in practice. Since the script uses a regex instead of
+                # a parser use a magic word.
+                if re.search(r'IGNORE-CYCLE', line) is None:
+                    system_includes.append(m.group(1))
 
     fully_qualified_includes = [
         locate_header_file(h, options.search_dirs)


        


More information about the libcxx-commits mailing list