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

via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 9 10:38:32 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Po-yao Chang (poyaoc97)

<details>
<summary>Changes</summary>

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

---
Full diff: https://github.com/llvm/llvm-project/pull/81294.diff


1 Files Affected:

- (modified) libcxx/modules/std/ostream.inc (+3-1) 


``````````diff
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

``````````

</details>


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


More information about the libcxx-commits mailing list