[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

NOKEYCHECK=True
GitOrigin-RevId: 8ff2d6af6906261567d8c10be62711ce899fb485
diff --git a/docs/DesignDocs/HeaderRemovalPolicy.rst b/docs/DesignDocs/HeaderRemovalPolicy.rst
new file mode 100644
index 0000000..7694708
--- /dev/null
+++ b/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/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst
index a89d4cd..fda4b69 100644
--- a/docs/ReleaseNotes.rst
+++ b/docs/ReleaseNotes.rst
@@ -45,6 +45,24 @@
 
 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/docs/index.rst b/docs/index.rst
index 71674e7..4964d13 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -175,6 +175,7 @@
    DesignDocs/ExtendedCXX03Support
    DesignDocs/FeatureTestMacros
    DesignDocs/FileTimeType
+   DesignDocs/HeaderRemovalPolicy
    DesignDocs/NoexceptPolicy
    DesignDocs/ThreadingSupportAPI
    DesignDocs/UniquePtrTrivialAbi
diff --git a/include/algorithm b/include/algorithm
index 69ada03..0b54fb9 100644
--- a/include/algorithm
+++ b/include/algorithm
@@ -1899,8 +1899,11 @@
 #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/include/any b/include/any
index b256630..cd704a9 100644
--- a/include/any
+++ b/include/any
@@ -94,8 +94,8 @@
 #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/include/array b/include/array
index 309ae8b..415ac16 100644
--- a/include/array
+++ b/include/array
@@ -123,7 +123,7 @@
 #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/include/atomic b/include/atomic
index 892b28a..2e92088 100644
--- a/include/atomic
+++ b/include/atomic
@@ -534,8 +534,13 @@
 # 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/include/bit b/include/bit
index c899458..1505c9b 100644
--- a/include/bit
+++ b/include/bit
@@ -71,7 +71,7 @@
 #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/include/charconv b/include/charconv
index 4f00755..d77cf3a 100644
--- a/include/charconv
+++ b/include/charconv
@@ -97,7 +97,7 @@
 #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/include/coroutine b/include/coroutine
index 6582f55..d7ed44e 100644
--- a/include/coroutine
+++ b/include/coroutine
@@ -46,7 +46,7 @@
 #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/include/deque b/include/deque
index 4a5136b..c38b544 100644
--- a/include/deque
+++ b/include/deque
@@ -185,7 +185,7 @@
 #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/include/experimental/simd b/include/experimental/simd
index c474292..532bc64 100644
--- a/include/experimental/simd
+++ b/include/experimental/simd
@@ -656,7 +656,7 @@
 #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/include/experimental/unordered_map b/include/experimental/unordered_map
index a5627e7..db114dc 100644
--- a/include/experimental/unordered_map
+++ b/include/experimental/unordered_map
@@ -45,7 +45,7 @@
 #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/include/ext/hash_map b/include/ext/hash_map
index a91716d..ab5a896 100644
--- a/include/ext/hash_map
+++ b/include/ext/hash_map
@@ -210,7 +210,7 @@
 #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/include/ext/hash_set b/include/ext/hash_set
index 1c9b5e7..332d609 100644
--- a/include/ext/hash_set
+++ b/include/ext/hash_set
@@ -199,7 +199,7 @@
 #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/include/forward_list b/include/forward_list
index f35aa85..c9fc20b 100644
--- a/include/forward_list
+++ b/include/forward_list
@@ -195,7 +195,7 @@
 #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/include/functional b/include/functional
index de02059..c969d7f 100644
--- a/include/functional
+++ b/include/functional
@@ -539,7 +539,7 @@
 #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/include/future b/include/future
index 5c29b28..643600a 100644
--- a/include/future
+++ b/include/future
@@ -378,8 +378,8 @@
 #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/include/iterator b/include/iterator
index 225ae81..6555b6d 100644
--- a/include/iterator
+++ b/include/iterator
@@ -724,7 +724,7 @@
 #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/include/list b/include/list
index 5fcbd67..668875b 100644
--- a/include/list
+++ b/include/list
@@ -203,7 +203,7 @@
 #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/include/locale b/include/locale
index ff12f66..c7da783 100644
--- a/include/locale
+++ b/include/locale
@@ -211,7 +211,7 @@
 #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/include/map b/include/map
index e1d5fa8..8b21f48 100644
--- a/include/map
+++ b/include/map
@@ -546,7 +546,7 @@
 #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/include/memory b/include/memory
index 83046f6..47134a0 100644
--- a/include/memory
+++ b/include/memory
@@ -887,7 +887,7 @@
 #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/include/mutex b/include/mutex
index 23007b1..a8334ba 100644
--- a/include/mutex
+++ b/include/mutex
@@ -198,7 +198,7 @@
 #endif
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #  include <functional>
 #endif
 
diff --git a/include/numeric b/include/numeric
index 057faf5..ba030aa 100644
--- a/include/numeric
+++ b/include/numeric
@@ -163,7 +163,7 @@
 #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/include/optional b/include/optional
index 865a717..d75b1fe 100644
--- a/include/optional
+++ b/include/optional
@@ -177,9 +177,12 @@
 #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/include/ostream b/include/ostream
index 59f7de6..216e583 100644
--- a/include/ostream
+++ b/include/ostream
@@ -171,7 +171,7 @@
 #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/include/random b/include/random
index 41ee4d8..1193d0d 100644
--- a/include/random
+++ b/include/random
@@ -1718,7 +1718,7 @@
 #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/include/regex b/include/regex
index 8361b41..3899892 100644
--- a/include/regex
+++ b/include/regex
@@ -778,7 +778,7 @@
 #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/include/set b/include/set
index da62f6f..f97ae2a 100644
--- a/include/set
+++ b/include/set
@@ -485,7 +485,7 @@
 #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/include/span b/include/span
index 0f4e0c5..190c441 100644
--- a/include/span
+++ b/include/span
@@ -148,7 +148,7 @@
 #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/include/stack b/include/stack
index 86435c4..a4a76e5 100644
--- a/include/stack
+++ b/include/stack
@@ -107,7 +107,7 @@
 #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/include/string b/include/string
index 2180f86..1ee0cdc 100644
--- a/include/string
+++ b/include/string
@@ -569,7 +569,7 @@
 #  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/include/string_view b/include/string_view
index d0c70a2..a964f13 100644
--- a/include/string_view
+++ b/include/string_view
@@ -224,7 +224,7 @@
 #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/include/thread b/include/thread
index 8b86992..85a845c 100644
--- a/include/thread
+++ b/include/thread
@@ -99,8 +99,11 @@
 #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/include/tuple b/include/tuple
index 2c72945..01c59b3 100644
--- a/include/tuple
+++ b/include/tuple
@@ -220,7 +220,7 @@
 #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/include/typeindex b/include/typeindex
index 6b2a78e..d1b750d 100644
--- a/include/typeindex
+++ b/include/typeindex
@@ -51,7 +51,7 @@
 #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/include/unordered_map b/include/unordered_map
index ebe2180..0731245 100644
--- a/include/unordered_map
+++ b/include/unordered_map
@@ -531,7 +531,7 @@
 #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/include/unordered_set b/include/unordered_set
index c3a3bc8..e294885 100644
--- a/include/unordered_set
+++ b/include/unordered_set
@@ -474,7 +474,7 @@
 #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/include/utility b/include/utility
index 7a1a45e..9462b83 100644
--- a/include/utility
+++ b/include/utility
@@ -243,7 +243,7 @@
 #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/include/valarray b/include/valarray
index 6f8a3b8..b47807c 100644
--- a/include/valarray
+++ b/include/valarray
@@ -360,7 +360,7 @@
 #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/include/variant b/include/variant
index e6988f3..7f8bb41 100644
--- a/include/variant
+++ b/include/variant
@@ -228,7 +228,7 @@
 #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/include/vector b/include/vector
index 87eb56c..0786a51 100644
--- a/include/vector
+++ b/include/vector
@@ -307,7 +307,7 @@
 #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/test/libcxx/transitive_includes/cxx20/expected.algorithm b/test/libcxx/transitive_includes/cxx20/expected.algorithm
index 944a3ee..f8ccff4 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.algorithm
+++ b/test/libcxx/transitive_includes/cxx20/expected.algorithm
@@ -1,7 +1,6 @@
 algorithm
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.any b/test/libcxx/transitive_includes/cxx20/expected.any
index 8600918..54d3883 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.any
+++ b/test/libcxx/transitive_includes/cxx20/expected.any
@@ -1,6 +1,5 @@
 any
 atomic
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.array b/test/libcxx/transitive_includes/cxx20/expected.array
index 7145642..ce00914 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.array
+++ b/test/libcxx/transitive_includes/cxx20/expected.array
@@ -2,7 +2,6 @@
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.atomic b/test/libcxx/transitive_includes/cxx20/expected.atomic
index 3e9917b..a211832 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.atomic
+++ b/test/libcxx/transitive_includes/cxx20/expected.atomic
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.barrier b/test/libcxx/transitive_includes/cxx20/expected.barrier
index c2865c8..883919a 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.barrier
+++ b/test/libcxx/transitive_includes/cxx20/expected.barrier
@@ -1,6 +1,5 @@
 atomic
 barrier
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.bitset b/test/libcxx/transitive_includes/cxx20/expected.bitset
index 3cf3e8d..a85bd53 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.bitset
+++ b/test/libcxx/transitive_includes/cxx20/expected.bitset
@@ -4,7 +4,6 @@
 bit
 bitset
 cctype
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.ccomplex b/test/libcxx/transitive_includes/cxx20/expected.ccomplex
index 98bf9a8..498d5a1 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.ccomplex
+++ b/test/libcxx/transitive_includes/cxx20/expected.ccomplex
@@ -6,7 +6,6 @@
 ccomplex
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.codecvt b/test/libcxx/transitive_includes/cxx20/expected.codecvt
index 0931ca1..5c7efd5 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.codecvt
+++ b/test/libcxx/transitive_includes/cxx20/expected.codecvt
@@ -4,7 +4,6 @@
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 codecvt
diff --git a/test/libcxx/transitive_includes/cxx20/expected.complex b/test/libcxx/transitive_includes/cxx20/expected.complex
index 64161c1..7b2a43f 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.complex
+++ b/test/libcxx/transitive_includes/cxx20/expected.complex
@@ -5,7 +5,6 @@
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.condition_variable b/test/libcxx/transitive_includes/cxx20/expected.condition_variable
index 968007a..c3a60ae 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.condition_variable
+++ b/test/libcxx/transitive_includes/cxx20/expected.condition_variable
@@ -4,7 +4,6 @@
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.ctgmath b/test/libcxx/transitive_includes/cxx20/expected.ctgmath
index 7467a5a..7275913 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.ctgmath
+++ b/test/libcxx/transitive_includes/cxx20/expected.ctgmath
@@ -6,7 +6,6 @@
 ccomplex
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.deque b/test/libcxx/transitive_includes/cxx20/expected.deque
index c26bdc7..e314455 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.deque
+++ b/test/libcxx/transitive_includes/cxx20/expected.deque
@@ -2,7 +2,6 @@
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.experimental_algorithm b/test/libcxx/transitive_includes/cxx20/expected.experimental_algorithm
index 8a5cd7d..dfebf48 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.experimental_algorithm
+++ b/test/libcxx/transitive_includes/cxx20/expected.experimental_algorithm
@@ -1,7 +1,6 @@
 algorithm
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.experimental_coroutine b/test/libcxx/transitive_includes/cxx20/expected.experimental_coroutine
index 682f0fa..b7344ec 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.experimental_coroutine
+++ b/test/libcxx/transitive_includes/cxx20/expected.experimental_coroutine
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.experimental_deque b/test/libcxx/transitive_includes/cxx20/expected.experimental_deque
index bd86d15..961599b 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.experimental_deque
+++ b/test/libcxx/transitive_includes/cxx20/expected.experimental_deque
@@ -2,7 +2,6 @@
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.experimental_forward_list b/test/libcxx/transitive_includes/cxx20/expected.experimental_forward_list
index c43fab0..fe3c906 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.experimental_forward_list
+++ b/test/libcxx/transitive_includes/cxx20/expected.experimental_forward_list
@@ -2,7 +2,6 @@
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.experimental_functional b/test/libcxx/transitive_includes/cxx20/expected.experimental_functional
index 87cee2d..689ccf1 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.experimental_functional
+++ b/test/libcxx/transitive_includes/cxx20/expected.experimental_functional
@@ -2,7 +2,6 @@
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.experimental_list b/test/libcxx/transitive_includes/cxx20/expected.experimental_list
index ac80065..5adfb13 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.experimental_list
+++ b/test/libcxx/transitive_includes/cxx20/expected.experimental_list
@@ -2,7 +2,6 @@
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.experimental_map b/test/libcxx/transitive_includes/cxx20/expected.experimental_map
index d132098..880a23b 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.experimental_map
+++ b/test/libcxx/transitive_includes/cxx20/expected.experimental_map
@@ -2,7 +2,6 @@
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.experimental_memory_resource b/test/libcxx/transitive_includes/cxx20/expected.experimental_memory_resource
index 94d9abd..b5ff253 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.experimental_memory_resource
+++ b/test/libcxx/transitive_includes/cxx20/expected.experimental_memory_resource
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.experimental_regex b/test/libcxx/transitive_includes/cxx20/expected.experimental_regex
index 8a49aac..f91eef1 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.experimental_regex
+++ b/test/libcxx/transitive_includes/cxx20/expected.experimental_regex
@@ -4,7 +4,6 @@
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.experimental_set b/test/libcxx/transitive_includes/cxx20/expected.experimental_set
index f1d2953..5558bc6 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.experimental_set
+++ b/test/libcxx/transitive_includes/cxx20/expected.experimental_set
@@ -2,7 +2,6 @@
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.experimental_simd b/test/libcxx/transitive_includes/cxx20/expected.experimental_simd
index f06f6e9..74f77f6 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.experimental_simd
+++ b/test/libcxx/transitive_includes/cxx20/expected.experimental_simd
@@ -2,7 +2,6 @@
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.experimental_string b/test/libcxx/transitive_includes/cxx20/expected.experimental_string
index 367a9ed..bb7e551 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.experimental_string
+++ b/test/libcxx/transitive_includes/cxx20/expected.experimental_string
@@ -3,7 +3,6 @@
 atomic
 bit
 cctype
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.experimental_unordered_map b/test/libcxx/transitive_includes/cxx20/expected.experimental_unordered_map
index 16753ae..3614946 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.experimental_unordered_map
+++ b/test/libcxx/transitive_includes/cxx20/expected.experimental_unordered_map
@@ -2,7 +2,6 @@
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.experimental_unordered_set b/test/libcxx/transitive_includes/cxx20/expected.experimental_unordered_set
index 1aafa61..0a77898 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.experimental_unordered_set
+++ b/test/libcxx/transitive_includes/cxx20/expected.experimental_unordered_set
@@ -2,7 +2,6 @@
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.experimental_vector b/test/libcxx/transitive_includes/cxx20/expected.experimental_vector
index 1c56962..ffd37e1 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.experimental_vector
+++ b/test/libcxx/transitive_includes/cxx20/expected.experimental_vector
@@ -1,7 +1,6 @@
 algorithm
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.ext_hash_map b/test/libcxx/transitive_includes/cxx20/expected.ext_hash_map
index 4595362..e199190 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.ext_hash_map
+++ b/test/libcxx/transitive_includes/cxx20/expected.ext_hash_map
@@ -3,7 +3,6 @@
 atomic
 bit
 cctype
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.ext_hash_set b/test/libcxx/transitive_includes/cxx20/expected.ext_hash_set
index 160335a..2a3d11e 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.ext_hash_set
+++ b/test/libcxx/transitive_includes/cxx20/expected.ext_hash_set
@@ -3,7 +3,6 @@
 atomic
 bit
 cctype
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.filesystem b/test/libcxx/transitive_includes/cxx20/expected.filesystem
index 22e80bc..02157ec 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.filesystem
+++ b/test/libcxx/transitive_includes/cxx20/expected.filesystem
@@ -5,7 +5,6 @@
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.format b/test/libcxx/transitive_includes/cxx20/expected.format
index 08d46d2..595b589 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.format
+++ b/test/libcxx/transitive_includes/cxx20/expected.format
@@ -5,7 +5,6 @@
 cctype
 cerrno
 charconv
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.forward_list b/test/libcxx/transitive_includes/cxx20/expected.forward_list
index 33afc74..dde7fba 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.forward_list
+++ b/test/libcxx/transitive_includes/cxx20/expected.forward_list
@@ -2,7 +2,6 @@
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.fstream b/test/libcxx/transitive_includes/cxx20/expected.fstream
index 7a892e1..7b14b7c 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.fstream
+++ b/test/libcxx/transitive_includes/cxx20/expected.fstream
@@ -5,7 +5,6 @@
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.functional b/test/libcxx/transitive_includes/cxx20/expected.functional
index 7625982..243ba6b 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.functional
+++ b/test/libcxx/transitive_includes/cxx20/expected.functional
@@ -2,7 +2,6 @@
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.future b/test/libcxx/transitive_includes/cxx20/expected.future
index 92bd4e0..148b1ea 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.future
+++ b/test/libcxx/transitive_includes/cxx20/expected.future
@@ -4,7 +4,6 @@
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.iomanip b/test/libcxx/transitive_includes/cxx20/expected.iomanip
index 3982908..fd99214 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.iomanip
+++ b/test/libcxx/transitive_includes/cxx20/expected.iomanip
@@ -5,7 +5,6 @@
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.ios b/test/libcxx/transitive_includes/cxx20/expected.ios
index 6e7e5b2..b2eec45 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.ios
+++ b/test/libcxx/transitive_includes/cxx20/expected.ios
@@ -4,7 +4,6 @@
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.iostream b/test/libcxx/transitive_includes/cxx20/expected.iostream
index 580aeaf..c743a03 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.iostream
+++ b/test/libcxx/transitive_includes/cxx20/expected.iostream
@@ -5,7 +5,6 @@
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.istream b/test/libcxx/transitive_includes/cxx20/expected.istream
index fd0c4b4..cd2a2f4 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.istream
+++ b/test/libcxx/transitive_includes/cxx20/expected.istream
@@ -5,7 +5,6 @@
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.latch b/test/libcxx/transitive_includes/cxx20/expected.latch
index a7a6bbc..ad8a92a 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.latch
+++ b/test/libcxx/transitive_includes/cxx20/expected.latch
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.list b/test/libcxx/transitive_includes/cxx20/expected.list
index b596079..e13c604 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.list
+++ b/test/libcxx/transitive_includes/cxx20/expected.list
@@ -2,7 +2,6 @@
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.locale b/test/libcxx/transitive_includes/cxx20/expected.locale
index 2971936..456f5a2 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.locale
+++ b/test/libcxx/transitive_includes/cxx20/expected.locale
@@ -4,7 +4,6 @@
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.map b/test/libcxx/transitive_includes/cxx20/expected.map
index c871579..bc84d66 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.map
+++ b/test/libcxx/transitive_includes/cxx20/expected.map
@@ -2,7 +2,6 @@
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.memory b/test/libcxx/transitive_includes/cxx20/expected.memory
index f36910f..db28f1f 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.memory
+++ b/test/libcxx/transitive_includes/cxx20/expected.memory
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.mutex b/test/libcxx/transitive_includes/cxx20/expected.mutex
index 4d101cb..dcaffb6 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.mutex
+++ b/test/libcxx/transitive_includes/cxx20/expected.mutex
@@ -4,7 +4,6 @@
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.numeric b/test/libcxx/transitive_includes/cxx20/expected.numeric
index 558b324..2597d54 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.numeric
+++ b/test/libcxx/transitive_includes/cxx20/expected.numeric
@@ -2,7 +2,6 @@
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.optional b/test/libcxx/transitive_includes/cxx20/expected.optional
index 993ce23..6b236d3 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.optional
+++ b/test/libcxx/transitive_includes/cxx20/expected.optional
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.ostream b/test/libcxx/transitive_includes/cxx20/expected.ostream
index 762d13c..c5cea41 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.ostream
+++ b/test/libcxx/transitive_includes/cxx20/expected.ostream
@@ -5,7 +5,6 @@
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.queue b/test/libcxx/transitive_includes/cxx20/expected.queue
index 5861852..a9915f6 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.queue
+++ b/test/libcxx/transitive_includes/cxx20/expected.queue
@@ -2,7 +2,6 @@
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.random b/test/libcxx/transitive_includes/cxx20/expected.random
index 96a956a..f61748b 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.random
+++ b/test/libcxx/transitive_includes/cxx20/expected.random
@@ -3,7 +3,6 @@
 atomic
 bit
 cctype
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.ranges b/test/libcxx/transitive_includes/cxx20/expected.ranges
index 3dbb13b..228747c 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.ranges
+++ b/test/libcxx/transitive_includes/cxx20/expected.ranges
@@ -2,7 +2,6 @@
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.regex b/test/libcxx/transitive_includes/cxx20/expected.regex
index 76df207..7dfb8e6 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.regex
+++ b/test/libcxx/transitive_includes/cxx20/expected.regex
@@ -4,7 +4,6 @@
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.scoped_allocator b/test/libcxx/transitive_includes/cxx20/expected.scoped_allocator
index 22dcb31..22b72aa 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.scoped_allocator
+++ b/test/libcxx/transitive_includes/cxx20/expected.scoped_allocator
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.semaphore b/test/libcxx/transitive_includes/cxx20/expected.semaphore
index d6802e2..5d6f0da 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.semaphore
+++ b/test/libcxx/transitive_includes/cxx20/expected.semaphore
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.set b/test/libcxx/transitive_includes/cxx20/expected.set
index 849e873..f41727f 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.set
+++ b/test/libcxx/transitive_includes/cxx20/expected.set
@@ -2,7 +2,6 @@
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.shared_mutex b/test/libcxx/transitive_includes/cxx20/expected.shared_mutex
index fdea61e..1372d40 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.shared_mutex
+++ b/test/libcxx/transitive_includes/cxx20/expected.shared_mutex
@@ -4,7 +4,6 @@
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.span b/test/libcxx/transitive_includes/cxx20/expected.span
index a46c30d..96d6346 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.span
+++ b/test/libcxx/transitive_includes/cxx20/expected.span
@@ -2,7 +2,6 @@
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.sstream b/test/libcxx/transitive_includes/cxx20/expected.sstream
index 1724fbd..00e0758 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.sstream
+++ b/test/libcxx/transitive_includes/cxx20/expected.sstream
@@ -5,7 +5,6 @@
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.stack b/test/libcxx/transitive_includes/cxx20/expected.stack
index 1a7d18c..21de647 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.stack
+++ b/test/libcxx/transitive_includes/cxx20/expected.stack
@@ -2,7 +2,6 @@
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.streambuf b/test/libcxx/transitive_includes/cxx20/expected.streambuf
index a3001ce..fa7e9ba 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.streambuf
+++ b/test/libcxx/transitive_includes/cxx20/expected.streambuf
@@ -4,7 +4,6 @@
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.string b/test/libcxx/transitive_includes/cxx20/expected.string
index 0dacf73..b90a8c8 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.string
+++ b/test/libcxx/transitive_includes/cxx20/expected.string
@@ -3,7 +3,6 @@
 atomic
 bit
 cctype
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.string_view b/test/libcxx/transitive_includes/cxx20/expected.string_view
index e814351..8b80b5b 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.string_view
+++ b/test/libcxx/transitive_includes/cxx20/expected.string_view
@@ -3,7 +3,6 @@
 atomic
 bit
 cctype
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.strstream b/test/libcxx/transitive_includes/cxx20/expected.strstream
index 782153b..9ebf526 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.strstream
+++ b/test/libcxx/transitive_includes/cxx20/expected.strstream
@@ -5,7 +5,6 @@
 bitset
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.system_error b/test/libcxx/transitive_includes/cxx20/expected.system_error
index 4101ee5..1afa1e3 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.system_error
+++ b/test/libcxx/transitive_includes/cxx20/expected.system_error
@@ -4,7 +4,6 @@
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.thread b/test/libcxx/transitive_includes/cxx20/expected.thread
index ab8c3c7..e314e55 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.thread
+++ b/test/libcxx/transitive_includes/cxx20/expected.thread
@@ -4,7 +4,6 @@
 bit
 cctype
 cerrno
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.unordered_map b/test/libcxx/transitive_includes/cxx20/expected.unordered_map
index 2250cf9..0d22614 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.unordered_map
+++ b/test/libcxx/transitive_includes/cxx20/expected.unordered_map
@@ -1,7 +1,6 @@
 algorithm
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.unordered_set b/test/libcxx/transitive_includes/cxx20/expected.unordered_set
index 9352f0b..44f4fd5 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.unordered_set
+++ b/test/libcxx/transitive_includes/cxx20/expected.unordered_set
@@ -2,7 +2,6 @@
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.valarray b/test/libcxx/transitive_includes/cxx20/expected.valarray
index a069f37..445b715 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.valarray
+++ b/test/libcxx/transitive_includes/cxx20/expected.valarray
@@ -2,7 +2,6 @@
 array
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx20/expected.vector b/test/libcxx/transitive_includes/cxx20/expected.vector
index 5fb9d7d..9fbca5e 100644
--- a/test/libcxx/transitive_includes/cxx20/expected.vector
+++ b/test/libcxx/transitive_includes/cxx20/expected.vector
@@ -1,7 +1,6 @@
 algorithm
 atomic
 bit
-chrono
 climits
 cmath
 compare
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.algorithm b/test/libcxx/transitive_includes/cxx2b/expected.algorithm
index 944a3ee..8e539be 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.algorithm
+++ b/test/libcxx/transitive_includes/cxx2b/expected.algorithm
@@ -1,7 +1,6 @@
 algorithm
 atomic
 bit
-chrono
 climits
 cmath
 compare
@@ -14,7 +13,6 @@
 exception
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -23,6 +21,4 @@
 tuple
 type_traits
 typeinfo
-utility
-variant
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.any b/test/libcxx/transitive_includes/cxx2b/expected.any
index 8600918..4f3cff5 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.any
+++ b/test/libcxx/transitive_includes/cxx2b/expected.any
@@ -1,6 +1,5 @@
 any
 atomic
-chrono
 climits
 cmath
 compare
@@ -13,7 +12,6 @@
 exception
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -22,6 +20,4 @@
 tuple
 type_traits
 typeinfo
-utility
-variant
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.array b/test/libcxx/transitive_includes/cxx2b/expected.array
index 7145642..0fb1b67 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.array
+++ b/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/test/libcxx/transitive_includes/cxx2b/expected.atomic b/test/libcxx/transitive_includes/cxx2b/expected.atomic
index 3e9917b..42e3c19 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.atomic
+++ b/test/libcxx/transitive_includes/cxx2b/expected.atomic
@@ -1,8 +1,5 @@
 atomic
-chrono
 climits
-cmath
-compare
 cstddef
 cstdint
 cstring
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.barrier b/test/libcxx/transitive_includes/cxx2b/expected.barrier
index c2865c8..cb7845f 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.barrier
+++ b/test/libcxx/transitive_includes/cxx2b/expected.barrier
@@ -1,6 +1,5 @@
 atomic
 barrier
-chrono
 climits
 cmath
 compare
@@ -13,7 +12,6 @@
 exception
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -22,6 +20,4 @@
 tuple
 type_traits
 typeinfo
-utility
-variant
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.bit b/test/libcxx/transitive_includes/cxx2b/expected.bit
index 4fb5285..3f58643 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.bit
+++ b/test/libcxx/transitive_includes/cxx2b/expected.bit
@@ -2,7 +2,6 @@
 cstddef
 cstdint
 cstdlib
-iosfwd
 limits
 type_traits
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.bitset b/test/libcxx/transitive_includes/cxx2b/expected.bitset
index 3cf3e8d..d3ee4af 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.bitset
+++ b/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 @@
 cwchar
 cwctype
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
-optional
 ratio
 stdexcept
 string
@@ -33,8 +26,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.ccomplex b/test/libcxx/transitive_includes/cxx2b/expected.ccomplex
index 98bf9a8..cfc2d04 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.ccomplex
+++ b/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 @@
 cwchar
 cwctype
 exception
-functional
 initializer_list
 ios
 iosfwd
 istream
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ostream
 ratio
 sstream
@@ -45,8 +38,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.charconv b/test/libcxx/transitive_includes/cxx2b/expected.charconv
index 1ab0e5d..448fc06 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.charconv
+++ b/test/libcxx/transitive_includes/cxx2b/expected.charconv
@@ -7,7 +7,6 @@
 cstdlib
 cstring
 initializer_list
-iosfwd
 limits
 type_traits
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.codecvt b/test/libcxx/transitive_includes/cxx2b/expected.codecvt
index 0931ca1..f846715 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.codecvt
+++ b/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 @@
 cwchar
 cwctype
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 mutex
 new
-optional
 ratio
 stdexcept
 string
@@ -36,8 +29,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.complex b/test/libcxx/transitive_includes/cxx2b/expected.complex
index 64161c1..eb5fe7c 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.complex
+++ b/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 @@
 cwchar
 cwctype
 exception
-functional
 initializer_list
 ios
 iosfwd
 istream
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ostream
 ratio
 sstream
@@ -44,8 +37,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.condition_variable b/test/libcxx/transitive_includes/cxx2b/expected.condition_variable
index 968007a..081849d 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.condition_variable
+++ b/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 @@
 cwchar
 cwctype
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
-optional
 ratio
 stdexcept
 string
@@ -35,8 +28,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.coroutine b/test/libcxx/transitive_includes/cxx2b/expected.coroutine
index 8dd332d..1f31012 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.coroutine
+++ b/test/libcxx/transitive_includes/cxx2b/expected.coroutine
@@ -4,7 +4,6 @@
 cstddef
 cstdint
 cstring
-iosfwd
 limits
 type_traits
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.ctgmath b/test/libcxx/transitive_includes/cxx2b/expected.ctgmath
index 7467a5a..ac37b74 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.ctgmath
+++ b/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 @@
 cwchar
 cwctype
 exception
-functional
 initializer_list
 ios
 iosfwd
 istream
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ostream
 ratio
 sstream
@@ -46,8 +39,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.deque b/test/libcxx/transitive_includes/cxx2b/expected.deque
index c26bdc7..aa51131 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.deque
+++ b/test/libcxx/transitive_includes/cxx2b/expected.deque
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -14,21 +10,14 @@
 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/test/libcxx/transitive_includes/cxx2b/expected.experimental_algorithm b/test/libcxx/transitive_includes/cxx2b/expected.experimental_algorithm
index 8a5cd7d..7e30791 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.experimental_algorithm
+++ b/test/libcxx/transitive_includes/cxx2b/expected.experimental_algorithm
@@ -1,7 +1,6 @@
 algorithm
 atomic
 bit
-chrono
 climits
 cmath
 compare
@@ -15,7 +14,6 @@
 experimental/algorithm
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -24,6 +22,4 @@
 tuple
 type_traits
 typeinfo
-utility
-variant
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.experimental_coroutine b/test/libcxx/transitive_includes/cxx2b/expected.experimental_coroutine
index 682f0fa..89fc3ed 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.experimental_coroutine
+++ b/test/libcxx/transitive_includes/cxx2b/expected.experimental_coroutine
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare
@@ -13,7 +12,6 @@
 experimental/coroutine
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -22,6 +20,4 @@
 tuple
 type_traits
 typeinfo
-utility
-variant
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.experimental_deque b/test/libcxx/transitive_includes/cxx2b/expected.experimental_deque
index bd86d15..e1677c7 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.experimental_deque
+++ b/test/libcxx/transitive_includes/cxx2b/expected.experimental_deque
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -17,21 +13,15 @@
 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/test/libcxx/transitive_includes/cxx2b/expected.experimental_forward_list b/test/libcxx/transitive_includes/cxx2b/expected.experimental_forward_list
index c43fab0..af433ce 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.experimental_forward_list
+++ b/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/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/test/libcxx/transitive_includes/cxx2b/expected.experimental_functional b/test/libcxx/transitive_includes/cxx2b/expected.experimental_functional
index 87cee2d..ce502b5 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.experimental_functional
+++ b/test/libcxx/transitive_includes/cxx2b/expected.experimental_functional
@@ -1,8 +1,5 @@
-algorithm
 array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -17,7 +14,6 @@
 functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -28,7 +24,5 @@
 type_traits
 typeinfo
 unordered_map
-utility
-variant
 vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.experimental_iterator b/test/libcxx/transitive_includes/cxx2b/expected.experimental_iterator
index 14d31c2..83a9b8d 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.experimental_iterator
+++ b/test/libcxx/transitive_includes/cxx2b/expected.experimental_iterator
@@ -14,7 +14,5 @@
 new
 tuple
 type_traits
-typeinfo
-utility
 variant
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.experimental_list b/test/libcxx/transitive_includes/cxx2b/expected.experimental_list
index ac80065..aae9f23 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.experimental_list
+++ b/test/libcxx/transitive_includes/cxx2b/expected.experimental_list
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -16,22 +12,16 @@
 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/test/libcxx/transitive_includes/cxx2b/expected.experimental_map b/test/libcxx/transitive_includes/cxx2b/expected.experimental_map
index d132098..cb76c76 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.experimental_map
+++ b/test/libcxx/transitive_includes/cxx2b/expected.experimental_map
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -16,10 +12,8 @@
 experimental/map
 experimental/memory_resource
 experimental/utility
-functional
 initializer_list
 iosfwd
-iterator
 limits
 map
 memory
@@ -30,8 +24,5 @@
 tuple
 type_traits
 typeinfo
-unordered_map
 utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.experimental_memory_resource b/test/libcxx/transitive_includes/cxx2b/expected.experimental_memory_resource
index 94d9abd..67d2441 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.experimental_memory_resource
+++ b/test/libcxx/transitive_includes/cxx2b/expected.experimental_memory_resource
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare
@@ -14,7 +13,6 @@
 experimental/utility
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -24,5 +22,4 @@
 type_traits
 typeinfo
 utility
-variant
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.experimental_regex b/test/libcxx/transitive_includes/cxx2b/expected.experimental_regex
index 8a49aac..6490adb 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.experimental_regex
+++ b/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/regex
 experimental/string
 experimental/utility
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 mutex
 new
-optional
 ratio
 regex
 stdexcept
@@ -41,8 +34,6 @@
 tuple
 type_traits
 typeinfo
-unordered_map
 utility
-variant
 vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.experimental_set b/test/libcxx/transitive_includes/cxx2b/expected.experimental_set
index f1d2953..03a09af 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.experimental_set
+++ b/test/libcxx/transitive_includes/cxx2b/expected.experimental_set
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -16,10 +12,8 @@
 experimental/memory_resource
 experimental/set
 experimental/utility
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -30,8 +24,5 @@
 tuple
 type_traits
 typeinfo
-unordered_map
 utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.experimental_simd b/test/libcxx/transitive_includes/cxx2b/expected.experimental_simd
index f06f6e9..999b0aa 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.experimental_simd
+++ b/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/test/libcxx/transitive_includes/cxx2b/expected.experimental_string b/test/libcxx/transitive_includes/cxx2b/expected.experimental_string
index 367a9ed..4fb0539 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.experimental_string
+++ b/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 @@
 experimental/memory_resource
 experimental/string
 experimental/utility
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
-optional
 ratio
 stdexcept
 string
@@ -35,8 +28,5 @@
 tuple
 type_traits
 typeinfo
-unordered_map
 utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.experimental_unordered_map b/test/libcxx/transitive_includes/cxx2b/expected.experimental_unordered_map
index 16753ae..04efa33 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.experimental_unordered_map
+++ b/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 @@
 experimental/memory_resource
 experimental/unordered_map
 experimental/utility
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -31,6 +25,4 @@
 typeinfo
 unordered_map
 utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.experimental_unordered_set b/test/libcxx/transitive_includes/cxx2b/expected.experimental_unordered_set
index 1aafa61..798b920 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.experimental_unordered_set
+++ b/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 @@
 experimental/memory_resource
 experimental/unordered_set
 experimental/utility
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -29,9 +23,6 @@
 tuple
 type_traits
 typeinfo
-unordered_map
 unordered_set
 utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.experimental_utility b/test/libcxx/transitive_includes/cxx2b/expected.experimental_utility
index a399b3e..788283f 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.experimental_utility
+++ b/test/libcxx/transitive_includes/cxx2b/expected.experimental_utility
@@ -5,7 +5,6 @@
 cstdlib
 experimental/utility
 initializer_list
-iosfwd
 limits
 type_traits
 utility
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.experimental_vector b/test/libcxx/transitive_includes/cxx2b/expected.experimental_vector
index 1c56962..35355e4 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.experimental_vector
+++ b/test/libcxx/transitive_includes/cxx2b/expected.experimental_vector
@@ -1,7 +1,4 @@
-algorithm
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -17,7 +14,6 @@
 experimental/vector
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -27,6 +23,5 @@
 type_traits
 typeinfo
 utility
-variant
 vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.ext_hash_map b/test/libcxx/transitive_includes/cxx2b/expected.ext_hash_map
index 4595362..238ba8f 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.ext_hash_map
+++ b/test/libcxx/transitive_includes/cxx2b/expected.ext_hash_map
@@ -3,7 +3,6 @@
 atomic
 bit
 cctype
-chrono
 climits
 cmath
 compare
@@ -21,7 +20,6 @@
 functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -34,7 +32,5 @@
 type_traits
 typeinfo
 unordered_map
-utility
-variant
 vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.ext_hash_set b/test/libcxx/transitive_includes/cxx2b/expected.ext_hash_set
index 160335a..5e58c46 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.ext_hash_set
+++ b/test/libcxx/transitive_includes/cxx2b/expected.ext_hash_set
@@ -3,7 +3,6 @@
 atomic
 bit
 cctype
-chrono
 climits
 cmath
 compare
@@ -21,7 +20,6 @@
 functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -34,7 +32,5 @@
 type_traits
 typeinfo
 unordered_map
-utility
-variant
 vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.filesystem b/test/libcxx/transitive_includes/cxx2b/expected.filesystem
index 22e80bc..adc5812 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.filesystem
+++ b/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 @@
 cwctype
 exception
 filesystem
-functional
 initializer_list
 iomanip
 ios
 iosfwd
 istream
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ostream
 ratio
 stdexcept
@@ -44,8 +37,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.format b/test/libcxx/transitive_includes/cxx2b/expected.format
index 08d46d2..d88f3f6 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.format
+++ b/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 @@
 cwctype
 exception
 format
-functional
 initializer_list
 ios
 iosfwd
-iterator
 limits
 locale
 memory
@@ -41,8 +37,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.forward_list b/test/libcxx/transitive_includes/cxx2b/expected.forward_list
index 33afc74..de184d3 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.forward_list
+++ b/test/libcxx/transitive_includes/cxx2b/expected.forward_list
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -14,21 +10,14 @@
 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/test/libcxx/transitive_includes/cxx2b/expected.fstream b/test/libcxx/transitive_includes/cxx2b/expected.fstream
index 7a892e1..31ef4da 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.fstream
+++ b/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 @@
 exception
 filesystem
 fstream
-functional
 initializer_list
 iomanip
 ios
 iosfwd
 istream
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ostream
 ratio
 stdexcept
@@ -45,8 +38,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.functional b/test/libcxx/transitive_includes/cxx2b/expected.functional
index 7625982..944f5a2 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.functional
+++ b/test/libcxx/transitive_includes/cxx2b/expected.functional
@@ -1,8 +1,5 @@
-algorithm
 array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -16,7 +13,6 @@
 functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -27,7 +23,5 @@
 type_traits
 typeinfo
 unordered_map
-utility
-variant
 vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.future b/test/libcxx/transitive_includes/cxx2b/expected.future
index 92bd4e0..978baba 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.future
+++ b/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 @@
 cwchar
 cwctype
 exception
-functional
 future
 initializer_list
 iosfwd
-iterator
 limits
 memory
 mutex
 new
-optional
 ratio
 stdexcept
 string
@@ -37,8 +30,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.iomanip b/test/libcxx/transitive_includes/cxx2b/expected.iomanip
index 3982908..86446ab 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.iomanip
+++ b/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 @@
 cwchar
 cwctype
 exception
-functional
 initializer_list
 iomanip
 ios
 iosfwd
 istream
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ostream
 ratio
 stdexcept
@@ -43,8 +36,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.ios b/test/libcxx/transitive_includes/cxx2b/expected.ios
index 6e7e5b2..3ecae93 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.ios
+++ b/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 @@
 cwchar
 cwctype
 exception
-functional
 initializer_list
 ios
 iosfwd
-iterator
 limits
 memory
 mutex
 new
-optional
 ratio
 stdexcept
 string
@@ -36,8 +29,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.iostream b/test/libcxx/transitive_includes/cxx2b/expected.iostream
index 580aeaf..2e4e74c 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.iostream
+++ b/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 @@
 cwchar
 cwctype
 exception
-functional
 initializer_list
 ios
 iosfwd
 iostream
 istream
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ostream
 ratio
 stdexcept
@@ -43,8 +36,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.istream b/test/libcxx/transitive_includes/cxx2b/expected.istream
index fd0c4b4..cbd4a87 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.istream
+++ b/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 @@
 cwchar
 cwctype
 exception
-functional
 initializer_list
 ios
 iosfwd
 istream
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ostream
 ratio
 stdexcept
@@ -42,8 +35,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.iterator b/test/libcxx/transitive_includes/cxx2b/expected.iterator
index 447087a..698f6cf 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.iterator
+++ b/test/libcxx/transitive_includes/cxx2b/expected.iterator
@@ -13,7 +13,5 @@
 new
 tuple
 type_traits
-typeinfo
-utility
 variant
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.latch b/test/libcxx/transitive_includes/cxx2b/expected.latch
index a7a6bbc..3d00941 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.latch
+++ b/test/libcxx/transitive_includes/cxx2b/expected.latch
@@ -1,8 +1,5 @@
 atomic
-chrono
 climits
-cmath
-compare
 cstddef
 cstdint
 cstring
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.list b/test/libcxx/transitive_includes/cxx2b/expected.list
index b596079..96d4f33 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.list
+++ b/test/libcxx/transitive_includes/cxx2b/expected.list
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -13,22 +9,15 @@
 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/test/libcxx/transitive_includes/cxx2b/expected.locale b/test/libcxx/transitive_includes/cxx2b/expected.locale
index 2971936..cdd6609 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.locale
+++ b/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 @@
 cwchar
 cwctype
 exception
-functional
 initializer_list
 ios
 iosfwd
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ratio
 stdexcept
 streambuf
@@ -39,8 +32,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.map b/test/libcxx/transitive_includes/cxx2b/expected.map
index c871579..a689628 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.map
+++ b/test/libcxx/transitive_includes/cxx2b/expected.map
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -13,10 +9,8 @@
 cstring
 ctime
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 map
 memory
@@ -27,8 +21,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.memory b/test/libcxx/transitive_includes/cxx2b/expected.memory
index f36910f..3b7a13d 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.memory
+++ b/test/libcxx/transitive_includes/cxx2b/expected.memory
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare
@@ -12,7 +11,6 @@
 exception
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -21,6 +19,4 @@
 tuple
 type_traits
 typeinfo
-utility
-variant
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.mutex b/test/libcxx/transitive_includes/cxx2b/expected.mutex
index 4d101cb..1aa71f5 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.mutex
+++ b/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 @@
 cwchar
 cwctype
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 mutex
 new
-optional
 ratio
 stdexcept
 string
@@ -35,8 +28,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.numeric b/test/libcxx/transitive_includes/cxx2b/expected.numeric
index 558b324..8435829 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.numeric
+++ b/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/test/libcxx/transitive_includes/cxx2b/expected.optional b/test/libcxx/transitive_includes/cxx2b/expected.optional
index 993ce23..e888c8f 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.optional
+++ b/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/test/libcxx/transitive_includes/cxx2b/expected.ostream b/test/libcxx/transitive_includes/cxx2b/expected.ostream
index 762d13c..1d7da3e 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.ostream
+++ b/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 @@
 cwchar
 cwctype
 exception
-functional
 initializer_list
 ios
 iosfwd
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ostream
 ratio
 stdexcept
@@ -41,8 +34,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.queue b/test/libcxx/transitive_includes/cxx2b/expected.queue
index 5861852..85fd646 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.queue
+++ b/test/libcxx/transitive_includes/cxx2b/expected.queue
@@ -1,8 +1,5 @@
-algorithm
 array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -17,7 +14,6 @@
 functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -29,7 +25,5 @@
 type_traits
 typeinfo
 unordered_map
-utility
-variant
 vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.random b/test/libcxx/transitive_includes/cxx2b/expected.random
index 96a956a..c8060db 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.random
+++ b/test/libcxx/transitive_includes/cxx2b/expected.random
@@ -1,9 +1,6 @@
-algorithm
-array
 atomic
 bit
 cctype
-chrono
 climits
 cmath
 compare
@@ -17,15 +14,12 @@
 cwchar
 cwctype
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
 numeric
-optional
 random
 ratio
 stdexcept
@@ -34,8 +28,5 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
 vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.ranges b/test/libcxx/transitive_includes/cxx2b/expected.ranges
index 3dbb13b..f16d5e5 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.ranges
+++ b/test/libcxx/transitive_includes/cxx2b/expected.ranges
@@ -1,9 +1,4 @@
-algorithm
 array
-atomic
-bit
-chrono
-climits
 cmath
 compare
 concepts
@@ -11,25 +6,17 @@
 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/test/libcxx/transitive_includes/cxx2b/expected.regex b/test/libcxx/transitive_includes/cxx2b/expected.regex
index 76df207..447e318 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.regex
+++ b/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 @@
 cwctype
 deque
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 mutex
 new
-optional
 ratio
 regex
 stdexcept
@@ -37,8 +30,5 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
 vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.scoped_allocator b/test/libcxx/transitive_includes/cxx2b/expected.scoped_allocator
index 22dcb31..f4345de 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.scoped_allocator
+++ b/test/libcxx/transitive_includes/cxx2b/expected.scoped_allocator
@@ -1,5 +1,4 @@
 atomic
-chrono
 climits
 cmath
 compare
@@ -12,7 +11,6 @@
 exception
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -22,6 +20,4 @@
 tuple
 type_traits
 typeinfo
-utility
-variant
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.semaphore b/test/libcxx/transitive_includes/cxx2b/expected.semaphore
index d6802e2..6893d09 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.semaphore
+++ b/test/libcxx/transitive_includes/cxx2b/expected.semaphore
@@ -1,8 +1,5 @@
 atomic
-chrono
 climits
-cmath
-compare
 cstddef
 cstdint
 cstring
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.set b/test/libcxx/transitive_includes/cxx2b/expected.set
index 849e873..9b0f3cb 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.set
+++ b/test/libcxx/transitive_includes/cxx2b/expected.set
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -13,10 +9,8 @@
 cstring
 ctime
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -27,8 +21,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.shared_mutex b/test/libcxx/transitive_includes/cxx2b/expected.shared_mutex
index fdea61e..2bd4140 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.shared_mutex
+++ b/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 @@
 cwchar
 cwctype
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
-optional
 ratio
 shared_mutex
 stdexcept
@@ -35,8 +28,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.span b/test/libcxx/transitive_includes/cxx2b/expected.span
index a46c30d..4ec9847 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.span
+++ b/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/test/libcxx/transitive_includes/cxx2b/expected.sstream b/test/libcxx/transitive_includes/cxx2b/expected.sstream
index 1724fbd..1acc28a 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.sstream
+++ b/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 @@
 cwchar
 cwctype
 exception
-functional
 initializer_list
 ios
 iosfwd
 istream
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ostream
 ratio
 sstream
@@ -43,8 +36,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.stack b/test/libcxx/transitive_includes/cxx2b/expected.stack
index 1a7d18c..17c8d99 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.stack
+++ b/test/libcxx/transitive_includes/cxx2b/expected.stack
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -14,22 +10,15 @@
 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/test/libcxx/transitive_includes/cxx2b/expected.streambuf b/test/libcxx/transitive_includes/cxx2b/expected.streambuf
index a3001ce..5e8e278 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.streambuf
+++ b/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 @@
 cwchar
 cwctype
 exception
-functional
 initializer_list
 ios
 iosfwd
-iterator
 limits
 memory
 mutex
 new
-optional
 ratio
 stdexcept
 streambuf
@@ -37,8 +30,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.string b/test/libcxx/transitive_includes/cxx2b/expected.string
index 0dacf73..9607070 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.string
+++ b/test/libcxx/transitive_includes/cxx2b/expected.string
@@ -1,9 +1,5 @@
-algorithm
-array
 atomic
-bit
 cctype
-chrono
 climits
 cmath
 compare
@@ -17,14 +13,11 @@
 cwchar
 cwctype
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
-optional
 ratio
 stdexcept
 string
@@ -32,8 +25,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.string_view b/test/libcxx/transitive_includes/cxx2b/expected.string_view
index e814351..6bb7edf 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.string_view
+++ b/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 @@
 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/test/libcxx/transitive_includes/cxx2b/expected.strstream b/test/libcxx/transitive_includes/cxx2b/expected.strstream
index 782153b..ed208f4 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.strstream
+++ b/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 @@
 cwchar
 cwctype
 exception
-functional
 initializer_list
 ios
 iosfwd
 istream
-iterator
 limits
 locale
 memory
 mutex
 new
-optional
 ostream
 ratio
 stdexcept
@@ -43,8 +36,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.system_error b/test/libcxx/transitive_includes/cxx2b/expected.system_error
index 4101ee5..30ca93c 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.system_error
+++ b/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 @@
 cwchar
 cwctype
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
-optional
 ratio
 stdexcept
 string
@@ -34,8 +27,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.thread b/test/libcxx/transitive_includes/cxx2b/expected.thread
index ab8c3c7..102ca58 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.thread
+++ b/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 @@
 cwchar
 cwctype
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
-optional
 ratio
 stdexcept
 string
@@ -35,8 +28,4 @@
 tuple
 type_traits
 typeinfo
-unordered_map
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.tuple b/test/libcxx/transitive_includes/cxx2b/expected.tuple
index 69858dc..2a4e44c 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.tuple
+++ b/test/libcxx/transitive_includes/cxx2b/expected.tuple
@@ -2,14 +2,7 @@
 compare
 cstddef
 cstdint
-cstdlib
-exception
-initializer_list
-iosfwd
 limits
-new
 tuple
 type_traits
-typeinfo
-utility
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.typeindex b/test/libcxx/transitive_includes/cxx2b/expected.typeindex
index 8f1c652..8ed5790 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.typeindex
+++ b/test/libcxx/transitive_includes/cxx2b/expected.typeindex
@@ -4,12 +4,8 @@
 cstdint
 cstdlib
 exception
-initializer_list
-iosfwd
 limits
-new
 type_traits
 typeindex
 typeinfo
-utility
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.unordered_map b/test/libcxx/transitive_includes/cxx2b/expected.unordered_map
index 2250cf9..4f2f2ff 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.unordered_map
+++ b/test/libcxx/transitive_includes/cxx2b/expected.unordered_map
@@ -1,7 +1,4 @@
-algorithm
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -14,7 +11,6 @@
 exception
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -25,6 +21,4 @@
 type_traits
 typeinfo
 unordered_map
-utility
-variant
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.unordered_set b/test/libcxx/transitive_includes/cxx2b/expected.unordered_set
index 9352f0b..2c825fb 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.unordered_set
+++ b/test/libcxx/transitive_includes/cxx2b/expected.unordered_set
@@ -1,8 +1,4 @@
-algorithm
-array
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -13,10 +9,8 @@
 cstring
 ctime
 exception
-functional
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -26,9 +20,5 @@
 tuple
 type_traits
 typeinfo
-unordered_map
 unordered_set
-utility
-variant
-vector
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.utility b/test/libcxx/transitive_includes/cxx2b/expected.utility
index 799a147..30781ff 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.utility
+++ b/test/libcxx/transitive_includes/cxx2b/expected.utility
@@ -4,7 +4,6 @@
 cstdint
 cstdlib
 initializer_list
-iosfwd
 limits
 type_traits
 utility
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.valarray b/test/libcxx/transitive_includes/cxx2b/expected.valarray
index a069f37..b5543ea 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.valarray
+++ b/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/test/libcxx/transitive_includes/cxx2b/expected.variant b/test/libcxx/transitive_includes/cxx2b/expected.variant
index d94d729..44553c7 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.variant
+++ b/test/libcxx/transitive_includes/cxx2b/expected.variant
@@ -6,12 +6,9 @@
 cstring
 exception
 initializer_list
-iosfwd
 limits
 new
 tuple
 type_traits
-typeinfo
-utility
 variant
 version
diff --git a/test/libcxx/transitive_includes/cxx2b/expected.vector b/test/libcxx/transitive_includes/cxx2b/expected.vector
index 5fb9d7d..9553eb0 100644
--- a/test/libcxx/transitive_includes/cxx2b/expected.vector
+++ b/test/libcxx/transitive_includes/cxx2b/expected.vector
@@ -1,7 +1,4 @@
-algorithm
 atomic
-bit
-chrono
 climits
 cmath
 compare
@@ -14,7 +11,6 @@
 exception
 initializer_list
 iosfwd
-iterator
 limits
 memory
 new
@@ -23,7 +19,5 @@
 tuple
 type_traits
 typeinfo
-utility
-variant
 vector
 version
diff --git a/utils/graph_header_deps.py b/utils/graph_header_deps.py
index 1fe0fcc..871a9d6 100755
--- a/utils/graph_header_deps.py
+++ b/utils/graph_header_deps.py
@@ -69,7 +69,15 @@
                 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)