[Lldb-commits] [lldb] [LLDB] Consolidate C++ string buffer summaries (PR #144258)

via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 16 07:17:58 PDT 2025


================
@@ -199,13 +183,13 @@ bool lldb_private::formatters::WCharSummaryProvider(
   options.SetBinaryZeroIsTerminator(false);
 
   switch (wchar_size) {
-  case 8:
+  case 1:
----------------
Nerixyz wrote:

No, this wasn't wrong. It used the _bit size_ before, and the libc++ summary used the _byte size_. I'm not sure which is better (I suppose 8 bits/byte is true for all targets supported by LLDB).

This reminds me of another difference: The `*CharSummaryProvider`s used `valobj.GetCompilerType().GetBasicTypeFromAST()` and the libc++ formatters used `ScratchTypeSystemClang::GetBasicType()`. Is there a big difference between them, and is one preferred over the other? 

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


More information about the lldb-commits mailing list