[libcxx-commits] [libcxx] 8110a73 - [libcxx][gardening] Re-order includes across libcxx.
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri May 21 13:22:18 PDT 2021
Author: zoecarver
Date: 2021-05-21T13:22:10-07:00
New Revision: 8110a7316401b30632d7efb0211f6059243260ac
URL: https://github.com/llvm/llvm-project/commit/8110a7316401b30632d7efb0211f6059243260ac
DIFF: https://github.com/llvm/llvm-project/commit/8110a7316401b30632d7efb0211f6059243260ac.diff
LOG: [libcxx][gardening] Re-order includes across libcxx.
This commit alphabetizes all includes in libcxx. This is a NFC.
This can also serve as a pseudo "announcement" for how we should order these headers going forward (note: double underscores go before other headers).
Differential Revision: https://reviews.llvm.org/D102941
Added:
Modified:
libcxx/include/__bsd_locale_fallbacks.h
libcxx/include/__iterator/concepts.h
libcxx/include/__iterator/iterator_traits.h
libcxx/include/__memory/shared_ptr.h
libcxx/include/__ranges/data.h
libcxx/include/__ranges/size.h
libcxx/include/__support/ibm/xlocale.h
libcxx/include/__support/openbsd/xlocale.h
libcxx/include/__support/win32/limits_msvc_win32.h
libcxx/include/__support/win32/locale_win32.h
Removed:
################################################################################
diff --git a/libcxx/include/__bsd_locale_fallbacks.h b/libcxx/include/__bsd_locale_fallbacks.h
index a807fe0395543..ed0eabf60ece2 100644
--- a/libcxx/include/__bsd_locale_fallbacks.h
+++ b/libcxx/include/__bsd_locale_fallbacks.h
@@ -13,9 +13,9 @@
#ifndef _LIBCPP_BSD_LOCALE_FALLBACKS_DEFAULTS_H
#define _LIBCPP_BSD_LOCALE_FALLBACKS_DEFAULTS_H
-#include <stdlib.h>
-#include <stdarg.h>
#include <memory>
+#include <stdarg.h>
+#include <stdlib.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
diff --git a/libcxx/include/__iterator/concepts.h b/libcxx/include/__iterator/concepts.h
index 985928119668d..283e39be1a475 100644
--- a/libcxx/include/__iterator/concepts.h
+++ b/libcxx/include/__iterator/concepts.h
@@ -11,12 +11,12 @@
#define _LIBCPP___ITERATOR_CONCEPTS_H
#include <__config>
-#include <concepts>
#include <__iterator/incrementable_traits.h>
-#include <__iterator/iterator_traits.h>
#include <__iterator/iter_move.h>
+#include <__iterator/iterator_traits.h>
#include <__iterator/readable_traits.h>
#include <__memory/pointer_traits.h>
+#include <concepts>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
diff --git a/libcxx/include/__iterator/iterator_traits.h b/libcxx/include/__iterator/iterator_traits.h
index b80439f7d3e92..ebffc974f0e1a 100644
--- a/libcxx/include/__iterator/iterator_traits.h
+++ b/libcxx/include/__iterator/iterator_traits.h
@@ -11,9 +11,9 @@
#define _LIBCPP___ITERATOR_ITERATOR_TRAITS_H
#include <__config>
-#include <concepts>
#include <__iterator/incrementable_traits.h>
#include <__iterator/readable_traits.h>
+#include <concepts>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/__memory/shared_ptr.h b/libcxx/include/__memory/shared_ptr.h
index 646c79a88b17d..e7f9af6c32db7 100644
--- a/libcxx/include/__memory/shared_ptr.h
+++ b/libcxx/include/__memory/shared_ptr.h
@@ -10,8 +10,8 @@
#ifndef _LIBCPP___MEMORY_SHARED_PTR_H
#define _LIBCPP___MEMORY_SHARED_PTR_H
-#include <__config>
#include <__availability>
+#include <__config>
#include <__functional_base> // std::less, std::binary_function
#include <__memory/addressof.h>
#include <__memory/allocation_guard.h>
diff --git a/libcxx/include/__ranges/data.h b/libcxx/include/__ranges/data.h
index 80546670dd007..04715bd863f7d 100644
--- a/libcxx/include/__ranges/data.h
+++ b/libcxx/include/__ranges/data.h
@@ -10,11 +10,10 @@
#define _LIBCPP___RANGES_DATA_H
#include <__config>
-
-#include <concepts>
#include <__iterator/concepts.h>
#include <__iterator/iterator_traits.h>
#include <__ranges/access.h>
+#include <concepts>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/__ranges/size.h b/libcxx/include/__ranges/size.h
index e94775407d729..9c186f01a766b 100644
--- a/libcxx/include/__ranges/size.h
+++ b/libcxx/include/__ranges/size.h
@@ -10,8 +10,8 @@
#define _LIBCPP___RANGES_SIZE_H
#include <__config>
-#include <__iterator/iterator_traits.h>
#include <__iterator/concepts.h>
+#include <__iterator/iterator_traits.h>
#include <__ranges/access.h>
#include <type_traits>
diff --git a/libcxx/include/__support/ibm/xlocale.h b/libcxx/include/__support/ibm/xlocale.h
index ff14d2e60b0d4..77ac02a2241ac 100644
--- a/libcxx/include/__support/ibm/xlocale.h
+++ b/libcxx/include/__support/ibm/xlocale.h
@@ -10,9 +10,9 @@
#ifndef _LIBCPP_SUPPORT_IBM_XLOCALE_H
#define _LIBCPP_SUPPORT_IBM_XLOCALE_H
-#include <stdarg.h>
#include <__support/ibm/locale_mgmt_aix.h>
#include <__support/ibm/locale_mgmt_zos.h>
+#include <stdarg.h>
#include "cstdlib"
diff --git a/libcxx/include/__support/openbsd/xlocale.h b/libcxx/include/__support/openbsd/xlocale.h
index 1136fa327fac5..49d66fde1e8ed 100644
--- a/libcxx/include/__support/openbsd/xlocale.h
+++ b/libcxx/include/__support/openbsd/xlocale.h
@@ -10,10 +10,10 @@
#ifndef _LIBCPP_SUPPORT_OPENBSD_XLOCALE_H
#define _LIBCPP_SUPPORT_OPENBSD_XLOCALE_H
-#include <cstdlib>
+#include <__support/xlocale/__strtonum_fallback.h>
#include <clocale>
-#include <cwctype>
+#include <cstdlib>
#include <ctype.h>
-#include <__support/xlocale/__strtonum_fallback.h>
+#include <cwctype>
#endif
diff --git a/libcxx/include/__support/win32/limits_msvc_win32.h b/libcxx/include/__support/win32/limits_msvc_win32.h
index 758d24647b1bf..c80df6693ce2f 100644
--- a/libcxx/include/__support/win32/limits_msvc_win32.h
+++ b/libcxx/include/__support/win32/limits_msvc_win32.h
@@ -17,8 +17,8 @@
#error "This header should only be included when using Microsofts C1XX frontend"
#endif
-#include <limits.h> // CHAR_BIT
#include <float.h> // limit constants
+#include <limits.h> // CHAR_BIT
#include <math.h> // HUGE_VAL
#include <ymath.h> // internal MSVC header providing the needed functionality
diff --git a/libcxx/include/__support/win32/locale_win32.h b/libcxx/include/__support/win32/locale_win32.h
index 3c5c87ae592d4..dd8a6001d6805 100644
--- a/libcxx/include/__support/win32/locale_win32.h
+++ b/libcxx/include/__support/win32/locale_win32.h
@@ -11,9 +11,9 @@
#define _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H
#include <__config>
-#include <stdio.h>
-#include <locale.h> // _locale_t
#include <__nullptr>
+#include <locale.h> // _locale_t
+#include <stdio.h>
#define _X_ALL LC_ALL
#define _X_COLLATE LC_COLLATE
More information about the libcxx-commits
mailing list