[libc-commits] [libc] [libc] Change cpp::string_view into cpp::basic_string_view<CharT> (PR #203355)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Wed Jun 24 13:55:37 PDT 2026


================
@@ -70,6 +70,19 @@ cpp::enable_if_t<cpp::is_fixed_point_v<T>, cpp::string> describeValue(T Value) {
 cpp::string_view describeValue(const cpp::string &Value) { return Value; }
 cpp::string_view describeValue(cpp::string_view Value) { return Value; }
 
+cpp::string describeValue(cpp::wstring_view Value) {
+  cpp::string S;
+  S += '{';
+  for (const wchar_t *Iter = Value.begin(); Iter + 1 != Value.end(); ++Iter) {
+    S += cpp::to_string(*Iter);
+    S += ',';
+  }
----------------
michaelrj-google wrote:

Right now wchar isn't supported on windows. I think falling back to what you have right now might be fine as a stopgap, but that might be better as a followup PR. For now I think you can land the PR as-is.

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


More information about the libc-commits mailing list