[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

Augusto Noronha via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 13 09:34:47 PDT 2024


================
@@ -441,14 +441,20 @@ ModuleSP ModuleList::GetModuleAtIndexUnlocked(size_t idx) const {
 void ModuleList::FindFunctions(ConstString name,
                                FunctionNameType name_type_mask,
                                const ModuleFunctionSearchOptions &options,
+                               const SymbolContext &sc,
                                SymbolContextList &sc_list) const {
   const size_t old_size = sc_list.GetSize();
 
   if (name_type_mask & eFunctionNameTypeAuto) {
     Module::LookupInfo lookup_info(name, name_type_mask, eLanguageTypeUnknown);
 
     std::lock_guard<std::recursive_mutex> guard(m_modules_mutex);
+    if (sc.module_sp)
----------------
augusto2112 wrote:

Should we assert that the module_sp belongs to the module list?

https://github.com/llvm/llvm-project/pull/102835


More information about the lldb-commits mailing list