[libc++] Fix __regex_word value when using newlib/picolibc
The ctype mask for newlib/picolibc is fully saturated, so __regex_word
has to overlap with one of the values. This commit uses the same workaround
as bionic did (uint16_t for char_class_type inside regex_traits). It
should be possible to have libc++ provide the default rune table instead,
but that will require a new mechanism to detect newlib inside __config
since the header defining the newlib/picolibc macros has not been included
yet inside __config. Doing it this way also avoids duplicating the ctype
table for newlib, reducing the global data size.
Differential Revision: https://reviews.llvm.org/D138195
NOKEYCHECK=True
GitOrigin-RevId: 4559864897500193d2812cea7b66dc8daba0b836
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst
index 584eed4..aac5d50 100644
--- a/docs/ReleaseNotes.rst
+++ b/docs/ReleaseNotes.rst
@@ -130,6 +130,11 @@
This ABI break only affects users that compile with ``-ffreestanding``, and only for ``atomic<T>`` where ``T``
is a non-builtin type that could be lockfree on the platform. See https://llvm.org/D133377 for more details.
+- When building libc++ against newlib/picolibc, the type of ``regex_type_traits::char_class_type`` was changed to
+ ``uint16_t`` since all values of ``ctype_base::mask`` are taken. This is technically an ABI break, but including
+ ``<regex> `` has triggered a ``static_assert`` failure since libc++ 14, so it is unlikely that this causes
+ problems for existing users.
+
Build System Changes
--------------------
- Support for ``libcxx``, ``libcxxabi`` and ``libunwind`` in ``LLVM_ENABLE_PROJECTS`` has officially