[libcxx-commits] [PATCH] D129862: [libc++][AIX] Correct the definition of __regex_word for AIX

Xing Xue via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jul 16 15:12:13 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGd29c9477320b: [libc++][AIX] Correct the definition of __regex_word for AIX (authored by xingxue).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129862/new/

https://reviews.llvm.org/D129862

Files:
  libcxx/include/__locale
  libcxx/test/std/re/re.traits/isctype.pass.cpp
  libcxx/test/std/re/re.traits/lookup_classname.pass.cpp


Index: libcxx/test/std/re/re.traits/lookup_classname.pass.cpp
===================================================================
--- libcxx/test/std/re/re.traits/lookup_classname.pass.cpp
+++ libcxx/test/std/re/re.traits/lookup_classname.pass.cpp
@@ -6,8 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: LIBCXX-AIX-FIXME
-
 // <regex>
 
 // template <class charT> struct regex_traits;
Index: libcxx/test/std/re/re.traits/isctype.pass.cpp
===================================================================
--- libcxx/test/std/re/re.traits/isctype.pass.cpp
+++ libcxx/test/std/re/re.traits/isctype.pass.cpp
@@ -6,8 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: LIBCXX-AIX-FIXME
-
 // <regex>
 
 // template <class charT> struct regex_traits;
Index: libcxx/include/__locale
===================================================================
--- libcxx/include/__locale
+++ libcxx/include/__locale
@@ -492,7 +492,11 @@
     static const mask punct  = _ISPUNCT;
     static const mask xdigit = _ISXDIGIT;
     static const mask blank  = _ISBLANK;
+# if defined(_AIX)
+    static const mask __regex_word = 0x8000;
+# else
     static const mask __regex_word = 0x80;
+# endif
 #elif defined(_NEWLIB_VERSION)
     // Same type as Newlib's _ctype_ array in newlib/libc/include/ctype.h.
     typedef char mask;
@@ -545,11 +549,8 @@
 
     _LIBCPP_INLINE_VISIBILITY ctype_base() {}
 
-// TODO: Remove the ifndef when the assert no longer fails on AIX.
-#ifndef _AIX
     static_assert((__regex_word & ~(space | print | cntrl | upper | lower | alpha | digit | punct | xdigit | blank)) == __regex_word,
                   "__regex_word can't overlap other bits");
-#endif
 };
 
 template <class _CharT> class _LIBCPP_TEMPLATE_VIS ctype;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129862.445270.patch
Type: text/x-patch
Size: 1846 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220716/100bb9dc/attachment.bin>


More information about the libcxx-commits mailing list