[Lldb-commits] [PATCH] D112222: [LLDB] libcxx summary formatters for std::string_view
Ben Jackson via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Oct 21 07:54:31 PDT 2021
puremourning created this revision.
puremourning requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
When printing a std::string_view, print the referenced string as the
summary. Support string_view, u32string_view, u16string_view and
wstring_view, as we do for std::string and friends.
This is based on the existing fomratter for std::string, and just
extracts the data and length members, pushing them through the existing
string formatter.
In testing this, a "FIXME" was corrected for printing of non-ASCII empty
values. Previously, the "u", 'U" etc. prefixes were not printed for
basic_string<> types that were not char. This is trivial to resolve by
printing the prefix before the `""`.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D112222
Files:
lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
lldb/source/Plugins/Language/CPlusPlus/LibCxx.h
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string_view/Makefile
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string_view/TestDataFormatterLibcxxStringView.py
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string_view/main.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112222.381263.patch
Type: text/x-patch
Size: 25448 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20211021/4a8773d5/attachment-0001.bin>
More information about the lldb-commits
mailing list