[libcxx-commits] [libcxx] 6382ec1 - [libc++][NFC] Reorder includes in locale.cpp
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Sep 9 10:53:51 PDT 2021
Author: Louis Dionne
Date: 2021-09-09T13:53:44-04:00
New Revision: 6382ec1abb5f3ce2db7ee6cc7adacad45dc3c1d1
URL: https://github.com/llvm/llvm-project/commit/6382ec1abb5f3ce2db7ee6cc7adacad45dc3c1d1
DIFF: https://github.com/llvm/llvm-project/commit/6382ec1abb5f3ce2db7ee6cc7adacad45dc3c1d1.diff
LOG: [libc++][NFC] Reorder includes in locale.cpp
Also, include <type_traits> unconditionally. There really isn't much
of a benefit in skipping it when exceptions are disabled.
Added:
Modified:
libcxx/src/locale.cpp
Removed:
################################################################################
diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp
index 79650963d574..f1978e046a23 100644
--- a/libcxx/src/locale.cpp
+++ b/libcxx/src/locale.cpp
@@ -12,28 +12,29 @@
#define _LCONV_C99
#endif
-#include "string"
-#include "locale"
-#include "codecvt"
-#include "vector"
#include "algorithm"
-#include "typeinfo"
-#ifndef _LIBCPP_NO_EXCEPTIONS
-# include "type_traits"
-#endif
#include "clocale"
+#include "codecvt"
+#include "cstdio"
+#include "cstdlib"
#include "cstring"
+#include "cwctype"
+#include "locale"
+#include "string"
+#include "type_traits"
+#include "typeinfo"
+#include "vector"
+
#if defined(_LIBCPP_MSVCRT)
-#define _CTYPE_DISABLE_MACROS
+# define _CTYPE_DISABLE_MACROS
#endif
-#include "cwctype"
+
#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
-#include "__support/win32/locale_win32.h"
+# include "__support/win32/locale_win32.h"
#elif !defined(__BIONIC__) && !defined(__NuttX__)
-#include <langinfo.h>
+# include <langinfo.h>
#endif
-#include <stdlib.h>
-#include <stdio.h>
+
#include "include/atomic_support.h"
#include "include/sso_allocator.h"
#include "__undef_macros"
More information about the libcxx-commits
mailing list