[libc++] newlib/xlocale.h: remove redundant includes
authorMichael Platings <michael.platings@arm.com>
Fri, 28 Oct 2022 13:19:05 +0000 (14:19 +0100)
committerMichael Platings <michael.platings@arm.com>
Mon, 31 Oct 2022 07:40:37 +0000 (07:40 +0000)
This permits using the <locale> header with newlib or picolibc when
LIBCXX_ENABLE_WIDE_CHARACTERS=FALSE.

Since D136682 the __support/xlocale headers themselves include the
headers they require, respecting the LIBCXX_ENABLE_WIDE_CHARACTERS
option.

Differential Revision: https://reviews.llvm.org/D136947

libcxx/include/__support/newlib/xlocale.h

index b75f926..72a7766 100644 (file)
 
 #if defined(_NEWLIB_VERSION)
 
-#include <cstdlib>
-#include <clocale>
-#include <cwctype>
-#include <ctype.h>
 #if !defined(__NEWLIB__) || __NEWLIB__ < 2 || \
     __NEWLIB__ == 2 && __NEWLIB_MINOR__ < 5
 #include <__support/xlocale/__nop_locale_mgmt.h>