[libcxx-commits] [libcxx] [libc++][modules] Fix disabling Unicode (PR #81294)

Po-yao Chang via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 9 10:38:03 PST 2024


https://github.com/poyaoc97 created https://github.com/llvm/llvm-project/pull/81294

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

>From 96fd62a9c71a21af1c20f392e74a0f89be6edd68 Mon Sep 17 00:00:00 2001
From: Po-yao Chang <poyaoc97 at gmail.com>
Date: Sat, 10 Feb 2024 02:32:42 +0800
Subject: [PATCH] [libc++][modules] Fix disabling Unicode

-DLIBCXX_ENABLE_UNICODE=ON or -D_LIBCPP_HAS_NO_UNICODE
doesn't build without this change.
---
 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 libcxx-commits mailing list