[llvm-branch-commits] [libcxx] release/18.x: [libc++][modules] Fix disabling Unicode (#81294) (PR #81361)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Feb 10 07:55:12 PST 2024


https://github.com/llvmbot created https://github.com/llvm/llvm-project/pull/81361

Backport 30cd1838dc334775f7a29f57b581f2bdda3f0ea1

Requested by: @poyaoc97

>From 91cb452c3cd1e527dd74ece20a83b9fb2ffa6f5c Mon Sep 17 00:00:00 2001
From: Po-yao Chang <poyaoc97 at gmail.com>
Date: Sat, 10 Feb 2024 22:22:16 +0800
Subject: [PATCH] [libc++][modules] Fix disabling Unicode (#81294)

-DLIBCXX_ENABLE_UNICODE=OFF or -D_LIBCPP_HAS_NO_UNICODE doesn't build
without this change.

(cherry picked from commit 30cd1838dc334775f7a29f57b581f2bdda3f0ea1)
---
 libcxx/modules/std/ostream.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libcxx/modules/std/ostream.inc b/libcxx/modules/std/ostream.inc
index 8fcbfb4bdc1828..0e0e2d54fe6bae 100644
--- a/libcxx/modules/std/ostream.inc
+++ b/libcxx/modules/std/ostream.inc
@@ -33,8 +33,10 @@ export namespace std {
   using std::println;
 
   using std::vprint_nonunicode;
+#    ifndef _LIBCPP_HAS_NO_UNICODE
   using std::vprint_unicode;
-#  endif // _LIBCPP_STD_VER >= 23
+#    endif // _LIBCPP_HAS_NO_UNICODE
+#  endif   // _LIBCPP_STD_VER >= 23
 
 #endif // _LIBCPP_HAS_NO_LOCALIZATION
 } // namespace std



More information about the llvm-branch-commits mailing list