Skip to content
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

[lldb] Remove unnecessary StaticString_SummaryProvider override (NFC) #10249

Open
wants to merge 1 commit into
base: stable/20240723
Choose a base branch
from
Open
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
11 changes: 2 additions & 9 deletions lldb/source/Plugins/Language/Swift/SwiftFormatters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -504,17 +504,9 @@ bool lldb_private::formatters::swift::StringIndex_SummaryProvider(
return true;
}

bool lldb_private::formatters::swift::StaticString_SummaryProvider(
ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
return StaticString_SummaryProvider(
valobj, stream, options,
StringPrinter::ReadStringAndDumpToStreamOptions());
}

bool lldb_private::formatters::swift::StaticString_SummaryProvider(
ValueObject &valobj, Stream &stream,
const TypeSummaryOptions &summary_options,
StringPrinter::ReadStringAndDumpToStreamOptions read_options) {
const TypeSummaryOptions &summary_options) {
LLDB_SCOPED_TIMER();

static ConstString g__startPtrOrData("_startPtrOrData");
Expand Down Expand Up @@ -552,6 +544,7 @@ bool lldb_private::formatters::swift::StaticString_SummaryProvider(
return true;
}

StringPrinter::ReadStringAndDumpToStreamOptions read_options;
read_options.SetTargetSP(valobj.GetTargetSP());
read_options.SetLocation(start_ptr);
read_options.SetSourceSize(size);
Expand Down
4 changes: 0 additions & 4 deletions lldb/source/Plugins/Language/Swift/SwiftFormatters.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ bool StringIndex_SummaryProvider(ValueObject &valobj, Stream &stream,
bool StaticString_SummaryProvider(ValueObject &valobj, Stream &stream,
const TypeSummaryOptions &options);

bool StaticString_SummaryProvider(
ValueObject &valobj, Stream &stream, const TypeSummaryOptions &,
StringPrinter::ReadStringAndDumpToStreamOptions);

bool SwiftSharedString_SummaryProvider(ValueObject &valobj, Stream &stream,
const TypeSummaryOptions &options);
bool SwiftSharedString_SummaryProvider_2(
Expand Down
6 changes: 2 additions & 4 deletions lldb/source/Plugins/Language/Swift/SwiftLanguage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,6 @@ static void LoadSwiftFormatters(lldb::TypeCategoryImplSP swift_category_sp) {
lldb_private::formatters::swift::StringIndex_SummaryProvider,
"Swift String.Index summary provider",
ConstString("Swift.String.Index"), summary_flags);
bool (*staticstring_summary_provider)(ValueObject &, Stream &,
const TypeSummaryOptions &) =
lldb_private::formatters::swift::StaticString_SummaryProvider;
{
TypeSummaryImpl::Flags substring_summary_flags = summary_flags;
substring_summary_flags.SetDontShowChildren(false);
Expand All @@ -479,7 +476,8 @@ static void LoadSwiftFormatters(lldb::TypeCategoryImplSP swift_category_sp) {
"Swift.Substring summary provider",
ConstString("Swift.Substring"), substring_summary_flags);
}
AddCXXSummary(swift_category_sp, staticstring_summary_provider,
AddCXXSummary(swift_category_sp,
lldb_private::formatters::swift::StaticString_SummaryProvider,
"Swift.StaticString summary provider",
ConstString("Swift.StaticString"), summary_flags);
AddCXXSummary(swift_category_sp,
Expand Down