[libcxx-commits] [libcxx] 06b40e8 - [libc++] Alphabetize header inclusions and include-what-you-use <__debug>. NFCI.

Arthur O'Dwyer via libcxx-commits libcxx-commits at lists.llvm.org
Tue May 18 16:56:55 PDT 2021


Author: Arthur O'Dwyer
Date: 2021-05-18T19:56:30-04:00
New Revision: 06b40e80aefc9a7ccf2efbf7717037bd103a779c

URL: https://github.com/llvm/llvm-project/commit/06b40e80aefc9a7ccf2efbf7717037bd103a779c
DIFF: https://github.com/llvm/llvm-project/commit/06b40e80aefc9a7ccf2efbf7717037bd103a779c.diff

LOG: [libc++] Alphabetize header inclusions and include-what-you-use <__debug>. NFCI.

Added: 
    

Modified: 
    libcxx/include/__node_handle
    libcxx/include/bit
    libcxx/include/deque
    libcxx/include/fstream
    libcxx/include/functional
    libcxx/include/future
    libcxx/include/map
    libcxx/include/numeric
    libcxx/include/regex
    libcxx/include/set
    libcxx/include/span

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__node_handle b/libcxx/include/__node_handle
index cf78a34e581dc..f3ffa5e3ac38a 100644
--- a/libcxx/include/__node_handle
+++ b/libcxx/include/__node_handle
@@ -11,6 +11,7 @@
 #define _LIBCPP___NODE_HANDLE
 
 #include <__config>
+#include <__debug>
 #include <memory>
 #include <optional>
 

diff  --git a/libcxx/include/bit b/libcxx/include/bit
index 12c90bb76a33e..7708106c8a712 100644
--- a/libcxx/include/bit
+++ b/libcxx/include/bit
@@ -56,10 +56,10 @@ namespace std {
 
 #include <__config>
 #include <__bits>
+#include <__debug>
 #include <limits>
 #include <type_traits>
 #include <version>
-#include <__debug>
 
 #if defined(__IBMCPP__)
 #include "__support/ibm/support.h"

diff  --git a/libcxx/include/deque b/libcxx/include/deque
index 571c061bd58fd..4780a24d3837a 100644
--- a/libcxx/include/deque
+++ b/libcxx/include/deque
@@ -161,13 +161,14 @@ template <class T, class Allocator, class Predicate>
 */
 
 #include <__config>
+#include <__debug>
 #include <__split_buffer>
+#include <algorithm>
 #include <compare>
-#include <type_traits>
 #include <initializer_list>
 #include <iterator>
-#include <algorithm>
 #include <stdexcept>
+#include <type_traits>
 #include <version>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)

diff  --git a/libcxx/include/fstream b/libcxx/include/fstream
index 5006923405d51..dd1aa72cf1573 100644
--- a/libcxx/include/fstream
+++ b/libcxx/include/fstream
@@ -181,11 +181,12 @@ typedef basic_fstream<wchar_t> wfstream;
 
 #include <__config>
 #include <__availability>
-#include <ostream>
-#include <istream>
+#include <__debug>
 #include <__locale>
 #include <cstdio>
 #include <cstdlib>
+#include <istream>
+#include <ostream>
 
 #if !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
 #   include <filesystem>

diff  --git a/libcxx/include/functional b/libcxx/include/functional
index 1eab545bf8535..8687ab8f1d8a5 100644
--- a/libcxx/include/functional
+++ b/libcxx/include/functional
@@ -507,6 +507,7 @@ POLICY:  For non-variadic implementations, the number of arguments is limited
 */
 
 #include <__config>
+#include <__debug>
 #include <concepts>
 #include <type_traits>
 #include <typeinfo>

diff  --git a/libcxx/include/future b/libcxx/include/future
index b17394571b81d..5701c294aa4b0 100644
--- a/libcxx/include/future
+++ b/libcxx/include/future
@@ -363,11 +363,12 @@ template <class R, class Alloc> struct uses_allocator<packaged_task<R>, Alloc>;
 
 #include <__config>
 #include <__availability>
-#include <system_error>
-#include <memory>
+#include <__debug>
 #include <chrono>
 #include <exception>
+#include <memory>
 #include <mutex>
+#include <system_error>
 #include <thread>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)

diff  --git a/libcxx/include/map b/libcxx/include/map
index 2ff28bfb8fbf8..065d1d17aa455 100644
--- a/libcxx/include/map
+++ b/libcxx/include/map
@@ -486,8 +486,9 @@ erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred);  // C++20
 */
 
 #include <__config>
-#include <__tree>
+#include <__debug>
 #include <__node_handle>
+#include <__tree>
 #include <compare>
 #include <initializer_list>
 #include <iterator> // __libcpp_erase_if_container

diff  --git a/libcxx/include/numeric b/libcxx/include/numeric
index 0fd48dee1128f..d42cbf97e5119 100644
--- a/libcxx/include/numeric
+++ b/libcxx/include/numeric
@@ -145,10 +145,11 @@ template<class T>
 */
 
 #include <__config>
+#include <__debug>
+#include <cmath> // for isnormal
+#include <functional>
 #include <iterator>
 #include <limits> // for numeric_limits
-#include <functional>
-#include <cmath> // for isnormal
 #include <version>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)

diff  --git a/libcxx/include/regex b/libcxx/include/regex
index 6104ce3bcc4e7..dafb0e694a6c6 100644
--- a/libcxx/include/regex
+++ b/libcxx/include/regex
@@ -763,16 +763,17 @@ typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator;
 */
 
 #include <__config>
-#include <stdexcept>
+#include <__debug>
 #include <__locale>
 #include <compare>
+#include <deque>
 #include <initializer_list>
-#include <utility>
 #include <iterator>
-#include <string>
 #include <memory>
+#include <stdexcept>
+#include <string>
+#include <utility>
 #include <vector>
-#include <deque>
 #include <version>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)

diff  --git a/libcxx/include/set b/libcxx/include/set
index 0612dd55d837b..b9d2895fa7c8a 100644
--- a/libcxx/include/set
+++ b/libcxx/include/set
@@ -434,8 +434,9 @@ erase_if(multiset<Key, Compare, Allocator>& c, Predicate pred);  // C++20
 */
 
 #include <__config>
-#include <__tree>
+#include <__debug>
 #include <__node_handle>
+#include <__tree>
 #include <compare>
 #include <functional>
 #include <initializer_list>

diff  --git a/libcxx/include/span b/libcxx/include/span
index 4c621abe80f34..61e2158e1c952 100644
--- a/libcxx/include/span
+++ b/libcxx/include/span
@@ -125,6 +125,7 @@ template<class Container>
 */
 
 #include <__config>
+#include <__debug>
 #include <__ranges/enable_borrowed_range.h>
 #include <array>        // for array
 #include <cstddef>      // for byte


        


More information about the libcxx-commits mailing list