[libc++] Rename include/support to include/__support
authorLouis Dionne <ldionne.2@gmail.com>
Tue, 2 Feb 2021 21:58:38 +0000 (16:58 -0500)
committerLouis Dionne <ldionne.2@gmail.com>
Thu, 4 Feb 2021 15:16:33 +0000 (10:16 -0500)
We do ship those headers, so the directory name should not be something
that can potentially conflict with user-defined directories.

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

31 files changed:
libcxx/include/CMakeLists.txt
libcxx/include/__locale
libcxx/include/__support/android/locale_bionic.h [moved from libcxx/include/support/android/locale_bionic.h with 90% similarity]
libcxx/include/__support/fuchsia/xlocale.h [moved from libcxx/include/support/fuchsia/xlocale.h with 74% similarity]
libcxx/include/__support/ibm/limits.h [moved from libcxx/include/support/ibm/limits.h with 97% similarity]
libcxx/include/__support/ibm/locale_mgmt_aix.h [moved from libcxx/include/support/ibm/locale_mgmt_aix.h with 96% similarity]
libcxx/include/__support/ibm/nanosleep.h [moved from libcxx/include/support/ibm/nanosleep.h with 100% similarity]
libcxx/include/__support/ibm/support.h [moved from libcxx/include/support/ibm/support.h with 95% similarity]
libcxx/include/__support/ibm/xlocale.h [moved from libcxx/include/support/ibm/xlocale.h with 97% similarity]
libcxx/include/__support/musl/xlocale.h [moved from libcxx/include/support/musl/xlocale.h with 95% similarity]
libcxx/include/__support/newlib/xlocale.h [moved from libcxx/include/support/newlib/xlocale.h with 82% similarity]
libcxx/include/__support/nuttx/xlocale.h [moved from libcxx/include/support/nuttx/xlocale.h with 70% similarity]
libcxx/include/__support/openbsd/xlocale.h [moved from libcxx/include/support/openbsd/xlocale.h with 78% similarity]
libcxx/include/__support/solaris/floatingpoint.h [moved from libcxx/include/support/solaris/floatingpoint.h with 100% similarity]
libcxx/include/__support/solaris/wchar.h [moved from libcxx/include/support/solaris/wchar.h with 100% similarity]
libcxx/include/__support/solaris/xlocale.h [moved from libcxx/include/support/solaris/xlocale.h with 100% similarity]
libcxx/include/__support/win32/limits_msvc_win32.h [moved from libcxx/include/support/win32/limits_msvc_win32.h with 96% similarity]
libcxx/include/__support/win32/locale_win32.h [moved from libcxx/include/support/win32/locale_win32.h with 99% similarity]
libcxx/include/__support/xlocale/__nop_locale_mgmt.h [moved from libcxx/include/support/xlocale/__nop_locale_mgmt.h with 94% similarity]
libcxx/include/__support/xlocale/__posix_l_fallback.h [moved from libcxx/include/support/xlocale/__posix_l_fallback.h with 98% similarity]
libcxx/include/__support/xlocale/__strtonum_fallback.h [moved from libcxx/include/support/xlocale/__strtonum_fallback.h with 96% similarity]
libcxx/include/__threading_support
libcxx/include/bit
libcxx/include/limits
libcxx/src/CMakeLists.txt
libcxx/src/locale.cpp
libcxx/src/support/solaris/xlocale.cpp
libcxx/src/support/win32/locale_win32.cpp
libcxx/src/support/win32/support.cpp
libcxx/src/support/win32/thread_win32.cpp
llvm/utils/gn/secondary/libcxx/include/BUILD.gn

index 9226d98..ec172f5 100644 (file)
@@ -151,25 +151,25 @@ set(files
   string.h
   string_view
   strstream
-  support/android/locale_bionic.h
-  support/fuchsia/xlocale.h
-  support/ibm/limits.h
-  support/ibm/locale_mgmt_aix.h
-  support/ibm/nanosleep.h
-  support/ibm/support.h
-  support/ibm/xlocale.h
-  support/musl/xlocale.h
-  support/newlib/xlocale.h
-  support/nuttx/xlocale.h
-  support/openbsd/xlocale.h
-  support/solaris/floatingpoint.h
-  support/solaris/wchar.h
-  support/solaris/xlocale.h
-  support/win32/limits_msvc_win32.h
-  support/win32/locale_win32.h
-  support/xlocale/__nop_locale_mgmt.h
-  support/xlocale/__posix_l_fallback.h
-  support/xlocale/__strtonum_fallback.h
+  __support/android/locale_bionic.h
+  __support/fuchsia/xlocale.h
+  __support/ibm/limits.h
+  __support/ibm/locale_mgmt_aix.h
+  __support/ibm/nanosleep.h
+  __support/ibm/support.h
+  __support/ibm/xlocale.h
+  __support/musl/xlocale.h
+  __support/newlib/xlocale.h
+  __support/nuttx/xlocale.h
+  __support/openbsd/xlocale.h
+  __support/solaris/floatingpoint.h
+  __support/solaris/wchar.h
+  __support/solaris/xlocale.h
+  __support/win32/limits_msvc_win32.h
+  __support/win32/locale_win32.h
+  __support/xlocale/__nop_locale_mgmt.h
+  __support/xlocale/__posix_l_fallback.h
+  __support/xlocale/__strtonum_fallback.h
   system_error
   tgmath.h
   thread
index a2da7d7..77e5faa 100644 (file)
 #include <locale.h>
 #if defined(_LIBCPP_MSVCRT_LIKE)
 # include <cstring>
-# include <support/win32/locale_win32.h>
+# include <__support/win32/locale_win32.h>
 #elif defined(__NuttX__)
-# include <support/nuttx/xlocale.h>
+# include <__support/nuttx/xlocale.h>
 #elif defined(_AIX) || defined(__MVS__)
-# include <support/ibm/xlocale.h>
+# include <__support/ibm/xlocale.h>
 #elif defined(__ANDROID__)
-# include <support/android/locale_bionic.h>
+# include <__support/android/locale_bionic.h>
 #elif defined(__sun__)
 # include <xlocale.h>
-# include <support/solaris/xlocale.h>
+# include <__support/solaris/xlocale.h>
 #elif defined(_NEWLIB_VERSION)
-# include <support/newlib/xlocale.h>
+# include <__support/newlib/xlocale.h>
 #elif defined(__OpenBSD__)
-# include <support/openbsd/xlocale.h>
+# include <__support/openbsd/xlocale.h>
 #elif (defined(__APPLE__)      || defined(__FreeBSD__) \
     || defined(__EMSCRIPTEN__) || defined(__IBMCPP__))
 # include <xlocale.h>
 #elif defined(__Fuchsia__)
-# include <support/fuchsia/xlocale.h>
+# include <__support/fuchsia/xlocale.h>
 #elif defined(__wasi__)
 // WASI libc uses musl's locales support.
-# include <support/musl/xlocale.h>
+# include <__support/musl/xlocale.h>
 #elif defined(_LIBCPP_HAS_MUSL_LIBC)
-# include <support/musl/xlocale.h>
+# include <__support/musl/xlocale.h>
 #endif
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-//===------------------- support/android/locale_bionic.h ------------------===//
+//===-----------------------------------------------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -28,13 +28,13 @@ extern "C" {
 #include <android/api-level.h>
 #include <android/ndk-version.h>
 #if __ANDROID_API__ < 21
-#include <support/xlocale/__posix_l_fallback.h>
+#include <__support/xlocale/__posix_l_fallback.h>
 #endif
 // In NDK versions later than 16, locale-aware functions are provided by
 // legacy_stdlib_inlines.h
 #if __NDK_MAJOR__ <= 16
 #if __ANDROID_API__ < 21
-#include <support/xlocale/__strtonum_fallback.h>
+#include <__support/xlocale/__strtonum_fallback.h>
 #elif __ANDROID_API__ < 26
 
 #if defined(__cplusplus)
similarity index 74%
rename from libcxx/include/support/fuchsia/xlocale.h
rename to libcxx/include/__support/fuchsia/xlocale.h
index b86ce9e..e8def81 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-//===------------------- support/fuchsia/xlocale.h ------------------------===//
+//===-----------------------------------------------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -14,8 +14,8 @@
 
 #include <cstdlib>
 #include <cwchar>
-#include <support/xlocale/__posix_l_fallback.h>
-#include <support/xlocale/__strtonum_fallback.h>
+#include <__support/xlocale/__posix_l_fallback.h>
+#include <__support/xlocale/__strtonum_fallback.h>
 
 #endif // defined(__Fuchsia__)
 
similarity index 97%
rename from libcxx/include/support/ibm/limits.h
rename to libcxx/include/__support/ibm/limits.h
index d1c59f0..45f1f1e 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-//===--------------------- support/ibm/limits.h ---------------------------===//
+//===-----------------------------------------------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-//===------------------- support/ibm/locale_mgmt_aix.h --------------------===//
+//===-----------------------------------------------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
similarity index 95%
rename from libcxx/include/support/ibm/support.h
rename to libcxx/include/__support/ibm/support.h
index 0569cbe..a7751b0 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-//===----------------------- support/ibm/support.h ----------------------===//
+//===-----------------------------------------------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
similarity index 97%
rename from libcxx/include/support/ibm/xlocale.h
rename to libcxx/include/__support/ibm/xlocale.h
index fde137c..ad07a25 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-//===--------------------- support/ibm/xlocale.h -------------------===//
+//===-----------------------------------------------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -9,7 +9,8 @@
 
 #ifndef _LIBCPP_SUPPORT_IBM_XLOCALE_H
 #define _LIBCPP_SUPPORT_IBM_XLOCALE_H
-#include <support/ibm/locale_mgmt_aix.h>
+
+#include <__support/ibm/locale_mgmt_aix.h>
 
 #include "cstdlib"
 
@@ -218,7 +219,7 @@ size_t strftime_l(char *__s, size_t __size, const char *__fmt,
 #elif defined(__MVS__)
 #include <wctype.h>
 // POSIX routines
-#include <support/xlocale/__posix_l_fallback.h>
+#include <__support/xlocale/__posix_l_fallback.h>
 #endif // defined(__MVS__)
 
 // The following are not POSIX routines.  These are quick-and-dirty hacks
similarity index 95%
rename from libcxx/include/support/musl/xlocale.h
rename to libcxx/include/__support/musl/xlocale.h
index 722d13f..2508a8e 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-//===------------------- support/musl/xlocale.h ------------------------===//
+//===-----------------------------------------------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
similarity index 82%
rename from libcxx/include/support/newlib/xlocale.h
rename to libcxx/include/__support/newlib/xlocale.h
index 25fa798..b75f926 100644 (file)
@@ -17,9 +17,9 @@
 #include <ctype.h>
 #if !defined(__NEWLIB__) || __NEWLIB__ < 2 || \
     __NEWLIB__ == 2 && __NEWLIB_MINOR__ < 5
-#include <support/xlocale/__nop_locale_mgmt.h>
-#include <support/xlocale/__posix_l_fallback.h>
-#include <support/xlocale/__strtonum_fallback.h>
+#include <__support/xlocale/__nop_locale_mgmt.h>
+#include <__support/xlocale/__posix_l_fallback.h>
+#include <__support/xlocale/__strtonum_fallback.h>
 #endif
 
 #endif // _NEWLIB_VERSION
similarity index 70%
rename from libcxx/include/support/nuttx/xlocale.h
rename to libcxx/include/__support/nuttx/xlocale.h
index b70d620..be738e3 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-//===-------------------- support/nuttx/xlocale.h -------------------------===//
+//===-----------------------------------------------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -11,8 +11,8 @@
 #define _LIBCPP_SUPPORT_NUTTX_XLOCALE_H
 
 #if defined(__NuttX__)
-#include <support/xlocale/__posix_l_fallback.h>
-#include <support/xlocale/__strtonum_fallback.h>
+#include <__support/xlocale/__posix_l_fallback.h>
+#include <__support/xlocale/__strtonum_fallback.h>
 #endif // __NuttX__
 
 #endif
similarity index 78%
rename from libcxx/include/support/openbsd/xlocale.h
rename to libcxx/include/__support/openbsd/xlocale.h
index fbfaedd..1136fa3 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-//===-------------------- support/openbsd/xlocale.h -----------------------===//
+//===-----------------------------------------------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -14,6 +14,6 @@
 #include <clocale>
 #include <cwctype>
 #include <ctype.h>
-#include <support/xlocale/__strtonum_fallback.h>
+#include <__support/xlocale/__strtonum_fallback.h>
 
 #endif
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-//===------------------ support/win32/limits_msvc_win32.h -----------------===//
+//===-----------------------------------------------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
similarity index 99%
rename from libcxx/include/support/win32/locale_win32.h
rename to libcxx/include/__support/win32/locale_win32.h
index 897c36b..d32a7a8 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-//===--------------------- support/win32/locale_win32.h -------------------===//
+//===-----------------------------------------------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-//===------------  support/xlocale/__nop_locale_mgmt.h -----------------===//
+//===-----------------------------------------------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-//===--------------- support/xlocale/__posix_l_fallback.h -----------------===//
+//===-----------------------------------------------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-//===-------------- support/xlocale/__strtonum_fallback.h -----------------===//
+//===-----------------------------------------------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
index 473c9c3..de572f3 100644 (file)
@@ -17,7 +17,7 @@
 #include <errno.h>
 
 #ifdef __MVS__
-# include <support/ibm/nanosleep.h>
+# include <__support/ibm/nanosleep.h>
 #endif
 
 #ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
index fe36017..f8c37c3 100644 (file)
@@ -62,7 +62,7 @@ namespace std {
 #include <__debug>
 
 #if defined(__IBMCPP__)
-#include "support/ibm/support.h"
+#include "__support/ibm/support.h"
 #endif
 #if defined(_LIBCPP_COMPILER_MSVC)
 #include <intrin.h>
index 6d5d1e1..8f97cd1 100644 (file)
@@ -105,11 +105,11 @@ template<> class numeric_limits<cv long double>;
 #include <type_traits>
 
 #if defined(_LIBCPP_COMPILER_MSVC)
-#include "support/win32/limits_msvc_win32.h"
+#include "__support/win32/limits_msvc_win32.h"
 #endif // _LIBCPP_MSVCRT
 
 #if defined(__IBMCPP__)
-#include "support/ibm/limits.h"
+#include "__support/ibm/limits.h"
 #endif // __IBMCPP__
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
index 224299b..76227d3 100644 (file)
@@ -109,7 +109,7 @@ endif()
 if (LIBCXX_CONFIGURE_IDE)
   file(GLOB_RECURSE LIBCXX_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../include/*)
   if(WIN32)
-    file( GLOB LIBCXX_WIN32_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../include/support/win32/*.h)
+    file( GLOB LIBCXX_WIN32_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../include/__support/win32/*.h)
     list(APPEND LIBCXX_HEADERS ${LIBCXX_WIN32_HEADERS})
   endif()
   # Force them all into the headers dir on MSVC, otherwise they end up at
index f109389..a0209d0 100644 (file)
@@ -29,7 +29,7 @@
 #include "cwctype"
 #include "__sso_allocator"
 #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>
 #endif
index d68a39f..d25adcd 100644 (file)
@@ -8,7 +8,7 @@
 
 #ifdef __sun__
 
-#include "support/solaris/xlocale.h"
+#include "__support/solaris/xlocale.h"
 #include <stdarg.h>
 #include <stdio.h>
 #include <sys/localedef.h>
index b7062db..e7c6005 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-//===-------------------- support/win32/locale_win32.cpp ------------------===//
+//===----------------------------------------------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
index d156e02..52453f5 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-//===----------------------- support/win32/support.h ----------------------===//
+//===----------------------------------------------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
index 83e7e9f..35c4c87 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-//===-------------------- support/win32/thread_win32.cpp ------------------===//
+//===----------------------------------------------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
index 0ce7e88..5ad30eb 100644 (file)
@@ -218,25 +218,25 @@ copy("include") {
     "string.h",
     "string_view",
     "strstream",
-    "support/android/locale_bionic.h",
-    "support/fuchsia/xlocale.h",
-    "support/ibm/limits.h",
-    "support/ibm/locale_mgmt_aix.h",
-    "support/ibm/nanosleep.h",
-    "support/ibm/support.h",
-    "support/ibm/xlocale.h",
-    "support/musl/xlocale.h",
-    "support/newlib/xlocale.h",
-    "support/nuttx/xlocale.h",
-    "support/openbsd/xlocale.h",
-    "support/solaris/floatingpoint.h",
-    "support/solaris/wchar.h",
-    "support/solaris/xlocale.h",
-    "support/win32/limits_msvc_win32.h",
-    "support/win32/locale_win32.h",
-    "support/xlocale/__nop_locale_mgmt.h",
-    "support/xlocale/__posix_l_fallback.h",
-    "support/xlocale/__strtonum_fallback.h",
+    "__support/android/locale_bionic.h",
+    "__support/fuchsia/xlocale.h",
+    "__support/ibm/limits.h",
+    "__support/ibm/locale_mgmt_aix.h",
+    "__support/ibm/nanosleep.h",
+    "__support/ibm/support.h",
+    "__support/ibm/xlocale.h",
+    "__support/musl/xlocale.h",
+    "__support/newlib/xlocale.h",
+    "__support/nuttx/xlocale.h",
+    "__support/openbsd/xlocale.h",
+    "__support/solaris/floatingpoint.h",
+    "__support/solaris/wchar.h",
+    "__support/solaris/xlocale.h",
+    "__support/win32/limits_msvc_win32.h",
+    "__support/win32/locale_win32.h",
+    "__support/xlocale/__nop_locale_mgmt.h",
+    "__support/xlocale/__posix_l_fallback.h",
+    "__support/xlocale/__strtonum_fallback.h",
     "system_error",
     "tgmath.h",
     "thread",