[all-commits] [llvm/llvm-project] 7244e9: [LLDB] libcxx summary formatters for std::string_view
Ben Jackson via All-commits
all-commits at lists.llvm.org
Fri Jan 7 11:41:29 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7244e9c2f5f3ea02cc0d7103fa35782f050aacf0
https://github.com/llvm/llvm-project/commit/7244e9c2f5f3ea02cc0d7103fa35782f050aacf0
Author: Ben Jackson <puremourning at gmail.com>
Date: 2022-01-07 (Fri, 07 Jan 2022)
Changed paths:
M lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
M lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
M lldb/source/Plugins/Language/CPlusPlus/LibCxx.h
A lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string_view/Makefile
A lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string_view/TestDataFormatterLibcxxStringView.py
A lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string_view/main.cpp
Log Message:
-----------
[LLDB] libcxx summary formatters for std::string_view
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 "".
Differential revision: https://reviews.llvm.org/D112222
More information about the All-commits
mailing list