@@ -192,8 +192,8 @@ FindSymbolForSwiftObject(Target &target, ConstString object,
192
192
llvm::Optional<lldb::addr_t > retval;
193
193
194
194
SymbolContextList sc_list;
195
- if ( target.GetImages ().FindSymbolsWithNameAndType (object, sym_type,
196
- sc_list)) {
195
+ target.GetImages ().FindSymbolsWithNameAndType (object, sym_type, sc_list);
196
+ if (! sc_list. IsEmpty ( )) {
197
197
SymbolContext SwiftObject_Class;
198
198
if (sc_list.GetSize () == 1 &&
199
199
sc_list.GetContextAtIndex (0 , SwiftObject_Class)) {
@@ -965,8 +965,9 @@ class LLDBMemoryReader : public swift::remote::MemoryReader {
965
965
966
966
ConstString name_cs (name.c_str (), name.size ());
967
967
SymbolContextList sc_list;
968
- if (!m_process->GetTarget ().GetImages ().FindSymbolsWithNameAndType (
969
- name_cs, lldb::eSymbolTypeAny, sc_list)) {
968
+ m_process->GetTarget ().GetImages ().FindSymbolsWithNameAndType (
969
+ name_cs, lldb::eSymbolTypeAny, sc_list);
970
+ if (sc_list.IsEmpty ()) {
970
971
LLDB_LOG (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES),
971
972
" [MemoryReader] symbol resoution failed {0}" , name);
972
973
return swift::remote::RemoteAddress (nullptr );
@@ -2516,8 +2517,10 @@ bool SwiftLanguageRuntime::GetTargetOfPartialApply(SymbolContext &curr_sc,
2516
2517
2517
2518
std::string apply_target = demangle_ctx.getThunkTarget (apply_name.GetStringRef ());
2518
2519
if (!apply_target.empty ()) {
2519
- size_t num_symbols = curr_sc.module_sp ->FindFunctions (
2520
- ConstString (apply_target), NULL , eFunctionNameTypeFull, true , false , false , sc_list);
2520
+ curr_sc.module_sp ->FindFunctions (ConstString (apply_target), NULL ,
2521
+ eFunctionNameTypeFull, true , false ,
2522
+ sc_list);
2523
+ size_t num_symbols = sc_list.GetSize ();
2521
2524
if (num_symbols == 0 )
2522
2525
return false ;
2523
2526
0 commit comments