Skip to content

[lldb/formatter] Add Swift.UnsafeRawBufferPointer data formatter #1314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions lldb/source/Plugins/Language/Swift/SwiftLanguage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,9 @@ static void LoadSwiftFormatters(lldb::TypeCategoryImplSP swift_category_sp) {
AddCXXSummary(
swift_category_sp,
lldb_private::formatters::swift::UnsafeBufferPointerSummaryProvider,
"Swift.Unsafe(Mutable)BufferPointer",
ConstString("^Swift.Unsafe(Mutable)?BufferPointer<.+>$"), summary_flags,
true);
"Swift.Unsafe[Mutable][Raw]BufferPointer",
ConstString("^Swift.Unsafe(Mutable)?(Raw)?BufferPointer(<.+>)?$"),
summary_flags, true);

DictionaryConfig::Get()
.RegisterSummaryProviders(swift_category_sp, summary_flags);
Expand Down Expand Up @@ -390,12 +390,13 @@ static void LoadSwiftFormatters(lldb::TypeCategoryImplSP swift_category_sp) {
synth_flags,
false);

AddCXXSynthetic(swift_category_sp,
lldb_private::formatters::swift::
UnsafeBufferPointerSyntheticFrontEndCreator,
"Swift.Unsafe(Mutable)BufferPointer",
ConstString("^Swift.Unsafe(Mutable)?BufferPointer<.+>$"),
synth_flags, true);
AddCXXSynthetic(
swift_category_sp,
lldb_private::formatters::swift::
UnsafeBufferPointerSyntheticFrontEndCreator,
"Swift.Unsafe[Mutable][Raw]BufferPointer",
ConstString("^Swift.Unsafe(Mutable)?(Raw)?BufferPointer(<.+>)?$"),
synth_flags, true);

DictionaryConfig::Get()
.RegisterSyntheticChildrenCreators(swift_category_sp, synth_flags);
Expand Down
Loading