Skip to content

Commit 51b0d52

Browse files
committed
[lldb] Adapt swift-form to LookupInfo changes
Since LookupInfo's constructor was made private in d7fb086, adapt the downstream code to use the new static function instead. Also, change the closure passed to Language::ForEach, to return a bool instead of the newer IterationAction.
1 parent 7901f38 commit 51b0d52

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

lldb/source/Core/Module.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ Module::LookupInfo::MakeLookupInfos(ConstString name,
718718
auto lang_type = lang->GetLanguageType();
719719
if (!llvm::is_contained(lang_types, lang_type))
720720
lang_types.push_back(lang_type);
721-
return IterationAction::Continue;
721+
return true;
722722
});
723723

724724
if (lang_types.empty())

lldb/source/Plugins/LanguageRuntime/Swift/SwiftLanguageRuntimeNames.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,10 +1539,10 @@ SwiftLanguageRuntime::GetGenericSignature(llvm::StringRef function_name,
15391539
/// Returns true if a function called `symbol_name` exists in `module`.
15401540
static bool SymbolExists(StringRef symbol_name, Module &module) {
15411541
SymbolContextList sc_list;
1542-
Module::LookupInfo lookup_info(ConstString(symbol_name),
1543-
lldb::FunctionNameType::eFunctionNameTypeFull,
1544-
lldb::eLanguageTypeSwift);
1545-
module.FindFunctions(lookup_info, CompilerDeclContext(),
1542+
auto lookup_infos = Module::LookupInfo::MakeLookupInfos(
1543+
ConstString(symbol_name), lldb::FunctionNameType::eFunctionNameTypeFull,
1544+
lldb::eLanguageTypeSwift);
1545+
module.FindFunctions(lookup_infos, CompilerDeclContext(),
15461546
ModuleFunctionSearchOptions(), sc_list);
15471547
return !sc_list.IsEmpty();
15481548
}

lldb/source/Target/Language.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,10 +625,10 @@ GetParentFunctionsWhileClosure(const SymbolContext &sc,
625625

626626
// Find the enclosing function, if it exists.
627627
SymbolContextList sc_list;
628-
Module::LookupInfo lookup_info(
628+
auto lookup_infos = Module::LookupInfo::MakeLookupInfos(
629629
ConstString(parent), lldb::FunctionNameType::eFunctionNameTypeFull,
630630
lldb::eLanguageTypeSwift);
631-
sc.module_sp->FindFunctions(lookup_info, CompilerDeclContext(),
631+
sc.module_sp->FindFunctions(lookup_infos, CompilerDeclContext(),
632632
ModuleFunctionSearchOptions(), sc_list);
633633
if (sc_list.GetSize() != 1 || sc_list[0].function == nullptr)
634634
break;

0 commit comments

Comments
 (0)