[libcxx-commits] [libcxx] 40a20ae - [libc++] Granularize <bit> includes
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Feb 17 02:36:29 PST 2023
Author: Nikolas Klauser
Date: 2023-02-17T11:36:19+01:00
New Revision: 40a20ae6ab80f2dffe046c07920ebb20ae465c89
URL: https://github.com/llvm/llvm-project/commit/40a20ae6ab80f2dffe046c07920ebb20ae465c89
DIFF: https://github.com/llvm/llvm-project/commit/40a20ae6ab80f2dffe046c07920ebb20ae465c89.diff
LOG: [libc++] Granularize <bit> includes
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D141228
Added:
Modified:
libcxx/docs/ReleaseNotes.rst
libcxx/include/__format/parser_std_format_spec.h
libcxx/include/__format/unicode.h
libcxx/include/__random/uniform_int_distribution.h
libcxx/include/algorithm
libcxx/include/chrono
libcxx/test/libcxx/transitive_includes/cxx03.csv
libcxx/test/libcxx/transitive_includes/cxx11.csv
libcxx/test/libcxx/transitive_includes/cxx14.csv
libcxx/test/libcxx/transitive_includes/cxx17.csv
libcxx/test/libcxx/transitive_includes/cxx20.csv
libcxx/test/libcxx/transitive_includes/cxx2b.csv
libcxx/test/std/numerics/bit/bit.endian/endian.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/docs/ReleaseNotes.rst b/libcxx/docs/ReleaseNotes.rst
index d86a96b3cf6d1..3fbe40c087030 100644
--- a/libcxx/docs/ReleaseNotes.rst
+++ b/libcxx/docs/ReleaseNotes.rst
@@ -57,7 +57,7 @@ Deprecations and Removals
includes are removed based on the language version used. Incidental transitive
inclusions of the following headers have been removed:
- - C++2b: ``type_traits``
+ - C++2b: ``bit``, ``type_traits``
Upcoming Deprecations and Removals
----------------------------------
diff --git a/libcxx/include/__format/parser_std_format_spec.h b/libcxx/include/__format/parser_std_format_spec.h
index 0d5c5c7961d5c..4fff9ad859d1a 100644
--- a/libcxx/include/__format/parser_std_format_spec.h
+++ b/libcxx/include/__format/parser_std_format_spec.h
@@ -31,7 +31,6 @@
#include <__iterator/concepts.h>
#include <__iterator/readable_traits.h> // iter_value_t
#include <__variant/monostate.h>
-#include <bit>
#include <cstdint>
#include <string_view>
#include <type_traits>
diff --git a/libcxx/include/__format/unicode.h b/libcxx/include/__format/unicode.h
index 5a6a1e7772588..53b5320600dc1 100644
--- a/libcxx/include/__format/unicode.h
+++ b/libcxx/include/__format/unicode.h
@@ -11,6 +11,7 @@
#define _LIBCPP___FORMAT_UNICODE_H
#include <__assert>
+#include <__bit/countl.h>
#include <__concepts/same_as.h>
#include <__config>
#include <__format/extended_grapheme_cluster_table.h>
@@ -18,7 +19,6 @@
#include <__iterator/readable_traits.h> // iter_value_t
#include <__type_traits/make_unsigned.h>
#include <__utility/unreachable.h>
-#include <bit>
#include <string_view>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/__random/uniform_int_distribution.h b/libcxx/include/__random/uniform_int_distribution.h
index 45f910b2f74e2..54158762c9b9c 100644
--- a/libcxx/include/__random/uniform_int_distribution.h
+++ b/libcxx/include/__random/uniform_int_distribution.h
@@ -9,12 +9,12 @@
#ifndef _LIBCPP___RANDOM_UNIFORM_INT_DISTRIBUTION_H
#define _LIBCPP___RANDOM_UNIFORM_INT_DISTRIBUTION_H
+#include <__bit/countl.h>
#include <__config>
#include <__random/is_valid.h>
#include <__random/log2.h>
#include <__type_traits/conditional.h>
#include <__type_traits/make_unsigned.h>
-#include <bit>
#include <cstddef>
#include <cstdint>
#include <iosfwd>
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm
index 0f9767c3663b3..21d177cbb66fd 100644
--- a/libcxx/include/algorithm
+++ b/libcxx/include/algorithm
@@ -1927,6 +1927,7 @@ template <class BidirectionalIterator, class Compare>
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <atomic>
+# include <bit>
# include <concepts>
# include <cstring>
# include <iterator>
diff --git a/libcxx/include/chrono b/libcxx/include/chrono
index fea391dcb80fb..2ecd6d4360cda 100644
--- a/libcxx/include/chrono
+++ b/libcxx/include/chrono
@@ -788,6 +788,7 @@ constexpr chrono::year operator ""y(unsigned lo
#endif
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <bit>
# include <concepts>
#endif
diff --git a/libcxx/test/libcxx/transitive_includes/cxx03.csv b/libcxx/test/libcxx/transitive_includes/cxx03.csv
index f85f35963481d..2e94901f53103 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx03.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx03.csv
@@ -105,6 +105,7 @@ charconv initializer_list
charconv iosfwd
charconv limits
charconv type_traits
+chrono bit
chrono compare
chrono concepts
chrono cstddef
@@ -322,7 +323,6 @@ filesystem system_error
filesystem type_traits
filesystem version
format array
-format bit
format charconv
format cstddef
format cstdint
diff --git a/libcxx/test/libcxx/transitive_includes/cxx11.csv b/libcxx/test/libcxx/transitive_includes/cxx11.csv
index 8cc3c7f865d26..a502ea7df8c6a 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx11.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx11.csv
@@ -105,6 +105,7 @@ charconv initializer_list
charconv iosfwd
charconv limits
charconv type_traits
+chrono bit
chrono compare
chrono concepts
chrono cstddef
@@ -322,7 +323,6 @@ filesystem system_error
filesystem type_traits
filesystem version
format array
-format bit
format charconv
format cstddef
format cstdint
diff --git a/libcxx/test/libcxx/transitive_includes/cxx14.csv b/libcxx/test/libcxx/transitive_includes/cxx14.csv
index aa2a6fe5a87af..5802061582cbb 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx14.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx14.csv
@@ -105,6 +105,7 @@ charconv initializer_list
charconv iosfwd
charconv limits
charconv type_traits
+chrono bit
chrono compare
chrono concepts
chrono cstddef
@@ -324,7 +325,6 @@ filesystem system_error
filesystem type_traits
filesystem version
format array
-format bit
format charconv
format cstddef
format cstdint
diff --git a/libcxx/test/libcxx/transitive_includes/cxx17.csv b/libcxx/test/libcxx/transitive_includes/cxx17.csv
index aa2a6fe5a87af..5802061582cbb 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx17.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx17.csv
@@ -105,6 +105,7 @@ charconv initializer_list
charconv iosfwd
charconv limits
charconv type_traits
+chrono bit
chrono compare
chrono concepts
chrono cstddef
@@ -324,7 +325,6 @@ filesystem system_error
filesystem type_traits
filesystem version
format array
-format bit
format charconv
format cstddef
format cstdint
diff --git a/libcxx/test/libcxx/transitive_includes/cxx20.csv b/libcxx/test/libcxx/transitive_includes/cxx20.csv
index 1044986d60eb1..0ea9ac5ee3230 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx20.csv
@@ -333,7 +333,6 @@ filesystem system_error
filesystem type_traits
filesystem version
format array
-format bit
format charconv
format cstddef
format cstdint
diff --git a/libcxx/test/libcxx/transitive_includes/cxx2b.csv b/libcxx/test/libcxx/transitive_includes/cxx2b.csv
index 4781c9d464734..120dc970121b4 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx2b.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx2b.csv
@@ -1,4 +1,3 @@
-algorithm bit
algorithm climits
algorithm cstddef
algorithm cstdint
@@ -73,7 +72,6 @@ charconv initializer_list
charconv limits
charconv type_traits
chrono array
-chrono bit
chrono charconv
chrono cmath
chrono compare
@@ -255,7 +253,6 @@ filesystem system_error
filesystem type_traits
filesystem version
format array
-format bit
format charconv
format cstddef
format cstdint
@@ -484,7 +481,6 @@ queue limits
queue type_traits
queue vector
queue version
-random bit
random cmath
random cstddef
random cstdint
diff --git a/libcxx/test/std/numerics/bit/bit.endian/endian.pass.cpp b/libcxx/test/std/numerics/bit/bit.endian/endian.pass.cpp
index ecba9601677a1..d16c8c2bddd25 100644
--- a/libcxx/test/std/numerics/bit/bit.endian/endian.pass.cpp
+++ b/libcxx/test/std/numerics/bit/bit.endian/endian.pass.cpp
@@ -12,9 +12,9 @@
// <bit>
#include <bit>
-#include <cstring>
#include <cassert>
#include <cstdint>
+#include <cstring>
#include <type_traits>
#include "test_macros.h"
More information about the libcxx-commits
mailing list