[llvm] [libcxx] [clang-tools-extra] [clang] [FIX] Fix the function isctype failed in arm64-big-endian (PR #73200)

via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 29 22:36:37 PST 2023


https://github.com/W-50243 updated https://github.com/llvm/llvm-project/pull/73200

>From ebc84bed665494dde9dbef956a0383ff79cb3d0c Mon Sep 17 00:00:00 2001
From: W-50243 <wanghao636 at huawei.com>
Date: Thu, 23 Nov 2023 11:02:24 +0800
Subject: [PATCH] [FIX] Fix the function isctype failed in arm64-big-endian

---
 libcxx/include/__locale | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libcxx/include/__locale b/libcxx/include/__locale
index b1502dd71edadf6..ef56135f2f1d45e 100644
--- a/libcxx/include/__locale
+++ b/libcxx/include/__locale
@@ -384,7 +384,7 @@ public:
     static const mask punct  = _ISpunct;
     static const mask xdigit = _ISxdigit;
     static const mask blank  = _ISblank;
-#if defined(__mips__)
+#if defined(__mips__) || (BYTE_ORDER == BIG_ENDIAN)
     static const mask __regex_word = static_cast<mask>(_ISbit(15));
 #else
     static const mask __regex_word = 0x80;



More information about the cfe-commits mailing list