[Lldb-commits] [PATCH] D53989: Fix formatting of wchar, char16, and char32
Zachary Turner via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Nov 1 11:52:15 PDT 2018
zturner created this revision.
zturner added a reviewer: jingham.
char16, char32, and wchar_t were previously broken. If you had a simple variable like `wchar_t x = L'1'` and wrote `p x` LLDB would output `(wchar_t) x = 1\0`. This is because it was using `eFormatChar` with a size of 2. What we needed was to introduce a special format specifically for `wchar_t`. The only valid sizes of `wchar_t` on all existing compilers are 2 and 4, so there's no real point trying to handle sizes of 1 and 8.
Along the way, I accidentally stumbled across the reason that references that char16 and char32 types were also formatting incorrectly, so I fixed that as well.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6943 bytes
Desc: not available
More information about the lldb-commits