[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)
Augusto Noronha via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 12 10:01:38 PDT 2024
================
@@ -799,20 +803,21 @@ IRExecutionUnit::FindInSymbols(const std::vector<ConstString> &names,
sc_list);
if (auto load_addr = resolver.Resolve(sc_list))
return *load_addr;
- }
- if (sc.target_sp) {
- SymbolContextList sc_list;
- sc.target_sp->GetImages().FindFunctions(name, lldb::eFunctionNameTypeFull,
- function_options, sc_list);
+ sc.module_sp->FindSymbolsWithNameAndType(name, lldb::eSymbolTypeAny,
+ sc_list);
if (auto load_addr = resolver.Resolve(sc_list))
return *load_addr;
}
- if (sc.target_sp) {
+ {
----------------
augusto2112 wrote:
Since you removed the check here, you can remove the parenthesis as well.
https://github.com/llvm/llvm-project/pull/102835
More information about the lldb-commits
mailing list