Skip to content

[lldb] Remove unnecessary Swift property variant names #10850

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

Draft
wants to merge 1 commit into
base: swift/release/6.2
Choose a base branch
from
Draft
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: 0 additions & 19 deletions lldb/source/Plugins/Language/Swift/SwiftLanguage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,25 +138,6 @@ SwiftLanguage::GetMethodNameVariants(ConstString method_name) const {
if (method_name.GetMangledCounterpart(counterpart))
if (SwiftLanguageRuntime::IsSwiftMangledName(counterpart.GetStringRef()))
variant_names.emplace_back(counterpart, eFunctionNameTypeFull);

// Properties can have multiple accessor blocks. This section of code supports
// breakpoints on accessor blocks by name.
//
// By default, the name `A.B` is treated as a fully qualified name, where `B`
// is the basename. However, some names can be interpreted in two ways, for
// example `A.get`. First, it can refer to the name `get` (in module `A`, or
// in type `A`). Second, it can refer the *getter* block for property `A`.
// LLDB's baseline behavior handles the first case. The second case is
// produced here as a variant name.
for (llvm::StringRef suffix : {".get", ".set", ".willset", ".didset"})
if (method_name.GetStringRef().ends_with(suffix)) {
// The method name, complete with suffix, *is* the variant.
variant_names.emplace_back(method_name, eFunctionNameTypeFull |
eFunctionNameTypeBase |
eFunctionNameTypeMethod);
break;
}

return variant_names;
}

Expand Down