[Lldb-commits] [lldb] 967df65 - Revert "[lldb] Filter DIEs based on qualified name where possible"

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 4 11:52:38 PDT 2022


Author: Alex Langford
Date: 2022-08-04T11:52:30-07:00
New Revision: 967df65a3610f98a3bc0ec0f2303641d7bad176c

URL: https://github.com/llvm/llvm-project/commit/967df65a3610f98a3bc0ec0f2303641d7bad176c
DIFF: https://github.com/llvm/llvm-project/commit/967df65a3610f98a3bc0ec0f2303641d7bad176c.diff

LOG: Revert "[lldb] Filter DIEs based on qualified name where possible"

This reverts commit befa77e59a7760d8c4fdd177b234e4a59500f61c.

Looks like this broke a SymbolFileNativePDB test. I'll investigate and
resubmit with a fix soon.

Added: 
    

Modified: 
    lldb/include/lldb/Core/Module.h
    lldb/include/lldb/Symbol/SymbolFile.h
    lldb/include/lldb/Symbol/SymbolFileOnDemand.h
    lldb/source/Breakpoint/BreakpointResolverName.cpp
    lldb/source/Core/Module.cpp
    lldb/source/Core/ModuleList.cpp
    lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
    lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
    lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp
    lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.h
    lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.h
    lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
    lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h
    lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
    lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.cpp
    lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.h
    lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
    lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.h
    lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
    lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.h
    lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
    lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
    lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
    lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
    lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
    lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
    lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
    lldb/source/Symbol/SymbolFile.cpp
    lldb/source/Symbol/SymbolFileOnDemand.cpp
    lldb/tools/lldb-test/lldb-test.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Core/Module.h b/lldb/include/lldb/Core/Module.h
index e877a14dcda10..117b14c586cf3 100644
--- a/lldb/include/lldb/Core/Module.h
+++ b/lldb/include/lldb/Core/Module.h
@@ -85,7 +85,6 @@ struct ModuleFunctionSearchOptions {
 class Module : public std::enable_shared_from_this<Module>,
                public SymbolContextScope {
 public:
-  class LookupInfo;
   // Static functions that can track the lifetime of module objects. This is
   // handy because we might have Module objects that are in shared pointers
   // that aren't in the global module list (from ModuleList). If this is the
@@ -295,23 +294,6 @@ class Module : public std::enable_shared_from_this<Module>,
   ///     matches.
   void FindCompileUnits(const FileSpec &path, SymbolContextList &sc_list);
 
-  /// Find functions by lookup info.
-  ///
-  /// If the function is an inlined function, it will have a block,
-  /// representing the inlined function, and the function will be the
-  /// containing function.  If it is not inlined, then the block will be NULL.
-  ///
-  /// \param[in] lookup_info
-  ///     The lookup info of the function we are looking for.
-  ///
-  /// \param[out] sc_list
-  ///     A symbol context list that gets filled in with all of the
-  ///     matches.
-  void FindFunctions(const LookupInfo &lookup_info,
-                     const CompilerDeclContext &parent_decl_ctx,
-                     const ModuleFunctionSearchOptions &options,
-                     SymbolContextList &sc_list);
-
   /// Find functions by name.
   ///
   /// If the function is an inlined function, it will have a block,
@@ -949,12 +931,6 @@ class Module : public std::enable_shared_from_this<Module>,
       m_name_type_mask = mask;
     }
 
-    lldb::LanguageType GetLanguageType() const { return m_language; }
-
-    bool NameMatchesLookupInfo(
-        ConstString function_name,
-        lldb::LanguageType language_type = lldb::eLanguageTypeUnknown) const;
-
     void Prune(SymbolContextList &sc_list, size_t start_idx) const;
 
   protected:

diff  --git a/lldb/include/lldb/Symbol/SymbolFile.h b/lldb/include/lldb/Symbol/SymbolFile.h
index 6d34e4cdc20fe..ed0de1b5bce6b 100644
--- a/lldb/include/lldb/Symbol/SymbolFile.h
+++ b/lldb/include/lldb/Symbol/SymbolFile.h
@@ -9,7 +9,6 @@
 #ifndef LLDB_SYMBOL_SYMBOLFILE_H
 #define LLDB_SYMBOL_SYMBOLFILE_H
 
-#include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleList.h"
 #include "lldb/Core/PluginInterface.h"
 #include "lldb/Core/SourceLocationSpec.h"
@@ -235,8 +234,9 @@ class SymbolFile : public PluginInterface {
   virtual void FindGlobalVariables(const RegularExpression &regex,
                                    uint32_t max_matches,
                                    VariableList &variables);
-  virtual void FindFunctions(const Module::LookupInfo &lookup_info,
+  virtual void FindFunctions(ConstString name,
                              const CompilerDeclContext &parent_decl_ctx,
+                             lldb::FunctionNameType name_type_mask,
                              bool include_inlines, SymbolContextList &sc_list);
   virtual void FindFunctions(const RegularExpression &regex,
                              bool include_inlines, SymbolContextList &sc_list);

diff  --git a/lldb/include/lldb/Symbol/SymbolFileOnDemand.h b/lldb/include/lldb/Symbol/SymbolFileOnDemand.h
index 653a004f77894..e47872c9761c6 100644
--- a/lldb/include/lldb/Symbol/SymbolFileOnDemand.h
+++ b/lldb/include/lldb/Symbol/SymbolFileOnDemand.h
@@ -135,8 +135,9 @@ class SymbolFileOnDemand : public lldb_private::SymbolFile {
                            uint32_t max_matches,
                            lldb_private::VariableList &variables) override;
 
-  void FindFunctions(const lldb_private::Module::LookupInfo &lookup_info,
+  void FindFunctions(lldb_private::ConstString name,
                      const lldb_private::CompilerDeclContext &parent_decl_ctx,
+                     lldb::FunctionNameType name_type_mask,
                      bool include_inlines,
                      lldb_private::SymbolContextList &sc_list) override;
 

diff  --git a/lldb/source/Breakpoint/BreakpointResolverName.cpp b/lldb/source/Breakpoint/BreakpointResolverName.cpp
index dbaeec9c9afb9..24e36f35bef02 100644
--- a/lldb/source/Breakpoint/BreakpointResolverName.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolverName.cpp
@@ -274,8 +274,9 @@ BreakpointResolverName::SearchCallback(SearchFilter &filter,
     if (context.module_sp) {
       for (const auto &lookup : m_lookups) {
         const size_t start_func_idx = func_list.GetSize();
-        context.module_sp->FindFunctions(lookup, CompilerDeclContext(),
-                                         function_options, func_list);
+        context.module_sp->FindFunctions(
+            lookup.GetLookupName(), CompilerDeclContext(),
+            lookup.GetNameTypeMask(), function_options, func_list);
 
         const size_t end_func_idx = func_list.GetSize();
 

diff  --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index 0704e0ea3b587..0d4466a13d254 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -727,41 +727,6 @@ Module::LookupInfo::LookupInfo(ConstString name,
   }
 }
 
-bool Module::LookupInfo::NameMatchesLookupInfo(
-    ConstString function_name, LanguageType language_type) const {
-  // We always keep unnamed symbols
-  if (!function_name)
-    return true;
-
-  // If we match exactly, we can return early
-  if (m_name == function_name)
-    return true;
-
-  // If function_name is mangled, we'll need to demangle it.
-  // In the pathologial case where the function name "looks" mangled but is
-  // actually demangled (e.g. a method named _Zonk), this operation should be
-  // relatively inexpensive since no demangling is actually occuring. See
-  // Mangled::SetValue for more context.
-  const bool function_name_may_be_mangled =
-      Mangled::GetManglingScheme(function_name.GetStringRef()) !=
-      Mangled::eManglingSchemeNone;
-  ConstString demangled_function_name = function_name;
-  if (function_name_may_be_mangled) {
-    Mangled mangled_function_name(function_name);
-    demangled_function_name = mangled_function_name.GetDemangledName();
-  }
-
-  // If the symbol has a language, then let the language make the match.
-  // Otherwise just check that the demangled function name contains the
-  // demangled user-provided name.
-  if (Language *language = Language::FindPlugin(language_type))
-    return language->DemangledNameContainsPath(m_name.GetStringRef(),
-                                               demangled_function_name);
-
-  llvm::StringRef function_name_ref = demangled_function_name.GetStringRef();
-  return function_name_ref.contains(m_name.GetStringRef());
-}
-
 void Module::LookupInfo::Prune(SymbolContextList &sc_list,
                                size_t start_idx) const {
   if (m_match_name_after_lookup && m_name) {
@@ -771,8 +736,20 @@ void Module::LookupInfo::Prune(SymbolContextList &sc_list,
       if (!sc_list.GetContextAtIndex(i, sc))
         break;
       
-      bool keep_it =
-          NameMatchesLookupInfo(sc.GetFunctionName(), sc.GetLanguage());
+      llvm::StringRef user_name = m_name.GetStringRef();
+      bool keep_it = true;
+      Language *language = Language::FindPlugin(sc.GetLanguage());
+      // If the symbol has a language, then let the language make the match.
+      // Otherwise just check that the demangled name contains the user name.
+      if (language)
+        keep_it = language->DemangledNameContainsPath(m_name.GetStringRef(),
+                sc.GetFunctionName());
+      else {
+        llvm::StringRef full_name = sc.GetFunctionName().GetStringRef();
+        // We always keep unnamed symbols:
+        if (!full_name.empty())
+          keep_it = full_name.contains(user_name);
+      }
       if (keep_it)
         ++i;
       else
@@ -821,37 +798,51 @@ void Module::LookupInfo::Prune(SymbolContextList &sc_list,
   }
 }
 
-void Module::FindFunctions(const Module::LookupInfo &lookup_info,
-                           const CompilerDeclContext &parent_decl_ctx,
-                           const ModuleFunctionSearchOptions &options,
-                           SymbolContextList &sc_list) {
-  // Find all the functions (not symbols, but debug information functions...
-  if (SymbolFile *symbols = GetSymbolFile()) {
-    symbols->FindFunctions(lookup_info, parent_decl_ctx,
-                           options.include_inlines, sc_list);
-    // Now check our symbol table for symbols that are code symbols if
-    // requested
-    if (options.include_symbols) {
-      if (Symtab *symtab = symbols->GetSymtab()) {
-        symtab->FindFunctionSymbols(lookup_info.GetLookupName(),
-                                    lookup_info.GetNameTypeMask(), sc_list);
-      }
-    }
-  }
-}
-
 void Module::FindFunctions(ConstString name,
                            const CompilerDeclContext &parent_decl_ctx,
                            FunctionNameType name_type_mask,
                            const ModuleFunctionSearchOptions &options,
                            SymbolContextList &sc_list) {
   const size_t old_size = sc_list.GetSize();
-  LookupInfo lookup_info(name, name_type_mask, eLanguageTypeUnknown);
-  FindFunctions(lookup_info, parent_decl_ctx, options, sc_list);
+
+  // Find all the functions (not symbols, but debug information functions...
+  SymbolFile *symbols = GetSymbolFile();
+
   if (name_type_mask & eFunctionNameTypeAuto) {
+    LookupInfo lookup_info(name, name_type_mask, eLanguageTypeUnknown);
+
+    if (symbols) {
+      symbols->FindFunctions(lookup_info.GetLookupName(), parent_decl_ctx,
+                             lookup_info.GetNameTypeMask(),
+                             options.include_inlines, sc_list);
+
+      // Now check our symbol table for symbols that are code symbols if
+      // requested
+      if (options.include_symbols) {
+        Symtab *symtab = symbols->GetSymtab();
+        if (symtab)
+          symtab->FindFunctionSymbols(lookup_info.GetLookupName(),
+                                      lookup_info.GetNameTypeMask(), sc_list);
+      }
+    }
+
     const size_t new_size = sc_list.GetSize();
+
     if (old_size < new_size)
       lookup_info.Prune(sc_list, old_size);
+  } else {
+    if (symbols) {
+      symbols->FindFunctions(name, parent_decl_ctx, name_type_mask,
+                             options.include_inlines, sc_list);
+
+      // Now check our symbol table for symbols that are code symbols if
+      // requested
+      if (options.include_symbols) {
+        Symtab *symtab = symbols->GetSymtab();
+        if (symtab)
+          symtab->FindFunctionSymbols(name, name_type_mask, sc_list);
+      }
+    }
   }
 }
 

diff  --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp
index baf44d220a1ad..1692a3710a3de 100644
--- a/lldb/source/Core/ModuleList.cpp
+++ b/lldb/source/Core/ModuleList.cpp
@@ -425,8 +425,9 @@ void ModuleList::FindFunctions(ConstString name,
 
     std::lock_guard<std::recursive_mutex> guard(m_modules_mutex);
     for (const ModuleSP &module_sp : m_modules) {
-      module_sp->FindFunctions(lookup_info, CompilerDeclContext(), options,
-                               sc_list);
+      module_sp->FindFunctions(lookup_info.GetLookupName(),
+                               CompilerDeclContext(),
+                               lookup_info.GetNameTypeMask(), options, sc_list);
     }
 
     const size_t new_size = sc_list.GetSize();

diff  --git a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
index 2782472d2b7ed..b5615c358b959 100644
--- a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
+++ b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
@@ -421,13 +421,12 @@ uint32_t SymbolFileBreakpad::ResolveSymbolContext(
 }
 
 void SymbolFileBreakpad::FindFunctions(
-    const Module::LookupInfo &lookup_info,
-    const CompilerDeclContext &parent_decl_ctx, bool include_inlines,
+    ConstString name, const CompilerDeclContext &parent_decl_ctx,
+    FunctionNameType name_type_mask, bool include_inlines,
     SymbolContextList &sc_list) {
   std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   // TODO: Implement this with supported FunctionNameType.
 
-  ConstString name = lookup_info.GetLookupName();
   for (uint32_t i = 0; i < GetNumCompileUnits(); ++i) {
     CompUnitSP cu_sp = GetCompileUnitAtIndex(i);
     FunctionSP func_sp = GetOrCreateFunction(*cu_sp);

diff  --git a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
index 7c1f6fa421f00..639d2e272adf7 100644
--- a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
+++ b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
@@ -110,8 +110,9 @@ class SymbolFileBreakpad : public SymbolFileCommon {
   void GetTypes(SymbolContextScope *sc_scope, lldb::TypeClass type_mask,
                 TypeList &type_list) override {}
 
-  void FindFunctions(const Module::LookupInfo &lookup_info,
+  void FindFunctions(ConstString name,
                      const CompilerDeclContext &parent_decl_ctx,
+                     lldb::FunctionNameType name_type_mask,
                      bool include_inlines, SymbolContextList &sc_list) override;
 
   void FindFunctions(const RegularExpression &regex, bool include_inlines,

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp b/lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp
index f6a49ba6141a7..4877169b32132 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp
@@ -180,13 +180,12 @@ void AppleDWARFIndex::GetNamespaces(
 }
 
 void AppleDWARFIndex::GetFunctions(
-    const Module::LookupInfo &lookup_info, SymbolFileDWARF &dwarf,
-    const CompilerDeclContext &parent_decl_ctx,
+    ConstString name, SymbolFileDWARF &dwarf,
+    const CompilerDeclContext &parent_decl_ctx, uint32_t name_type_mask,
     llvm::function_ref<bool(DWARFDIE die)> callback) {
-  ConstString name = lookup_info.GetLookupName();
   m_apple_names_up->FindByName(name.GetStringRef(), [&](DIERef die_ref) {
-    return ProcessFunctionDIE(lookup_info, die_ref, dwarf, parent_decl_ctx,
-                              callback);
+    return ProcessFunctionDIE(name.GetStringRef(), die_ref, dwarf,
+                              parent_decl_ctx, name_type_mask, callback);
   });
 }
 

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.h b/lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.h
index 3a5b8eef9cf40..ef3cb5dee0356 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.h
@@ -52,9 +52,9 @@ class AppleDWARFIndex : public DWARFIndex {
                 llvm::function_ref<bool(DWARFDIE die)> callback) override;
   void GetNamespaces(ConstString name,
                      llvm::function_ref<bool(DWARFDIE die)> callback) override;
-  void GetFunctions(const Module::LookupInfo &lookup_info,
-                    SymbolFileDWARF &dwarf,
+  void GetFunctions(ConstString name, SymbolFileDWARF &dwarf,
                     const CompilerDeclContext &parent_decl_ctx,
+                    uint32_t name_type_mask,
                     llvm::function_ref<bool(DWARFDIE die)> callback) override;
   void GetFunctions(const RegularExpression &regex,
                     llvm::function_ref<bool(DWARFDIE die)> callback) override;

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.h
index a6dba10c3057a..97b0ea1874e12 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.h
@@ -31,9 +31,6 @@ class DWARFASTParser {
                                           const DWARFDIE &die,
                                           bool *type_is_new_ptr) = 0;
 
-  virtual lldb_private::ConstString
-  ConstructDemangledNameFromDWARF(const DWARFDIE &die) = 0;
-
   virtual lldb_private::Function *
   ParseFunctionFromDWARF(lldb_private::CompileUnit &comp_unit,
                          const DWARFDIE &die,

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
index 9e37bef8bc897..b6407af18cfdf 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -2280,39 +2280,6 @@ size_t DWARFASTParserClang::ParseChildEnumerators(
   return enumerators_added;
 }
 
-ConstString
-DWARFASTParserClang::ConstructDemangledNameFromDWARF(const DWARFDIE &die) {
-  bool is_static = false;
-  bool is_variadic = false;
-  bool has_template_params = false;
-  unsigned type_quals = 0;
-  std::vector<CompilerType> param_types;
-  std::vector<clang::ParmVarDecl *> param_decls;
-  StreamString sstr;
-
-  DWARFDeclContext decl_ctx = SymbolFileDWARF::GetDWARFDeclContext(die);
-  sstr << decl_ctx.GetQualifiedName();
-
-  clang::DeclContext *containing_decl_ctx =
-      GetClangDeclContextContainingDIE(die, nullptr);
-  ParseChildParameters(containing_decl_ctx, die, true, is_static, is_variadic,
-                       has_template_params, param_types, param_decls,
-                       type_quals);
-  sstr << "(";
-  for (size_t i = 0; i < param_types.size(); i++) {
-    if (i > 0)
-      sstr << ", ";
-    sstr << param_types[i].GetTypeName();
-  }
-  if (is_variadic)
-    sstr << ", ...";
-  sstr << ")";
-  if (type_quals & clang::Qualifiers::Const)
-    sstr << " const";
-
-  return ConstString(sstr.GetString());
-}
-
 Function *
 DWARFASTParserClang::ParseFunctionFromDWARF(CompileUnit &comp_unit,
                                             const DWARFDIE &die,
@@ -2350,7 +2317,35 @@ DWARFASTParserClang::ParseFunctionFromDWARF(CompileUnit &comp_unit,
       // If the mangled name is not present in the DWARF, generate the
       // demangled name using the decl context. We skip if the function is
       // "main" as its name is never mangled.
-      func_name.SetValue(ConstructDemangledNameFromDWARF(die), false);
+      bool is_static = false;
+      bool is_variadic = false;
+      bool has_template_params = false;
+      unsigned type_quals = 0;
+      std::vector<CompilerType> param_types;
+      std::vector<clang::ParmVarDecl *> param_decls;
+      StreamString sstr;
+
+      DWARFDeclContext decl_ctx = SymbolFileDWARF::GetDWARFDeclContext(die);
+      sstr << decl_ctx.GetQualifiedName();
+
+      clang::DeclContext *containing_decl_ctx =
+          GetClangDeclContextContainingDIE(die, nullptr);
+      ParseChildParameters(containing_decl_ctx, die, true, is_static,
+                           is_variadic, has_template_params, param_types,
+                           param_decls, type_quals);
+      sstr << "(";
+      for (size_t i = 0; i < param_types.size(); i++) {
+        if (i > 0)
+          sstr << ", ";
+        sstr << param_types[i].GetTypeName();
+      }
+      if (is_variadic)
+        sstr << ", ...";
+      sstr << ")";
+      if (type_quals & clang::Qualifiers::Const)
+        sstr << " const";
+
+      func_name.SetValue(ConstString(sstr.GetString()), false);
     } else
       func_name.SetValue(ConstString(name), false);
 

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h
index 735665328fd50..2bc166cf9f8ad 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h
@@ -45,9 +45,6 @@ class DWARFASTParserClang : public DWARFASTParser {
                                   const DWARFDIE &die,
                                   bool *type_is_new_ptr) override;
 
-  lldb_private::ConstString
-  ConstructDemangledNameFromDWARF(const DWARFDIE &die) override;
-
   lldb_private::Function *
   ParseFunctionFromDWARF(lldb_private::CompileUnit &comp_unit,
                          const DWARFDIE &die,

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
index 600a2ea4214be..c98953640a58f 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
@@ -18,7 +18,6 @@
 #include "lldb/Expression/DWARFExpression.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Utility/Stream.h"
-#include "lldb/Utility/StreamString.h"
 
 #include "DWARFCompileUnit.h"
 #include "DWARFDebugAbbrev.h"

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.cpp
index 71df9e07e175a..5131584f55222 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.cpp
@@ -11,9 +11,7 @@
 #include "Plugins/SymbolFile/DWARF/DWARFDIE.h"
 #include "Plugins/SymbolFile/DWARF/SymbolFileDWARF.h"
 
-#include "lldb/Core/Mangled.h"
 #include "lldb/Core/Module.h"
-#include "lldb/Target/Language.h"
 
 using namespace lldb_private;
 using namespace lldb;
@@ -21,33 +19,15 @@ using namespace lldb;
 DWARFIndex::~DWARFIndex() = default;
 
 bool DWARFIndex::ProcessFunctionDIE(
-    const Module::LookupInfo &lookup_info, DIERef ref, SymbolFileDWARF &dwarf,
-    const CompilerDeclContext &parent_decl_ctx,
+    llvm::StringRef name, DIERef ref, SymbolFileDWARF &dwarf,
+    const CompilerDeclContext &parent_decl_ctx, uint32_t name_type_mask,
     llvm::function_ref<bool(DWARFDIE die)> callback) {
-  llvm::StringRef name = lookup_info.GetLookupName().GetStringRef();
-  FunctionNameType name_type_mask = lookup_info.GetNameTypeMask();
   DWARFDIE die = dwarf.GetDIE(ref);
   if (!die) {
     ReportInvalidDIERef(ref, name);
     return true;
   }
 
-  if (!(name_type_mask & eFunctionNameTypeFull)) {
-    ConstString name_to_match_against;
-    if (const char *mangled_die_name = die.GetMangledName()) {
-      name_to_match_against = ConstString(mangled_die_name);
-    } else {
-      SymbolFileDWARF *symbols = die.GetDWARF();
-      if (ConstString demangled_die_name =
-              symbols->ConstructFunctionDemangledName(die))
-        name_to_match_against = demangled_die_name;
-    }
-
-    if (!lookup_info.NameMatchesLookupInfo(name_to_match_against,
-                                           lookup_info.GetLanguageType()))
-      return true;
-  }
-
   // Exit early if we're searching exclusively for methods or selectors and
   // we have a context specified (no methods in namespaces).
   uint32_t looking_for_nonmethods =

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.h
index c8207931a819f..c4995e7215543 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.h
@@ -13,7 +13,6 @@
 #include "Plugins/SymbolFile/DWARF/DWARFDIE.h"
 #include "Plugins/SymbolFile/DWARF/DWARFFormValue.h"
 
-#include "lldb/Core/Module.h"
 #include "lldb/Target/Statistics.h"
 
 class DWARFDeclContext;
@@ -55,8 +54,9 @@ class DWARFIndex {
   GetNamespaces(ConstString name,
                 llvm::function_ref<bool(DWARFDIE die)> callback) = 0;
   virtual void
-  GetFunctions(const Module::LookupInfo &lookup_info, SymbolFileDWARF &dwarf,
+  GetFunctions(ConstString name, SymbolFileDWARF &dwarf,
                const CompilerDeclContext &parent_decl_ctx,
+               uint32_t name_type_mask,
                llvm::function_ref<bool(DWARFDIE die)> callback) = 0;
   virtual void
   GetFunctions(const RegularExpression &regex,
@@ -74,9 +74,10 @@ class DWARFIndex {
   /// the function given by "ref" matches search criteria given by
   /// "parent_decl_ctx" and "name_type_mask", it is inserted into the "dies"
   /// vector.
-  bool ProcessFunctionDIE(const Module::LookupInfo &lookup_info, DIERef ref,
+  bool ProcessFunctionDIE(llvm::StringRef name, DIERef ref,
                           SymbolFileDWARF &dwarf,
                           const CompilerDeclContext &parent_decl_ctx,
+                          uint32_t name_type_mask,
                           llvm::function_ref<bool(DWARFDIE die)> callback);
 
   class DIERefCallbackImpl {

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
index a8e9b41c83fe4..ad22078ffa3eb 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
@@ -238,10 +238,10 @@ void DebugNamesDWARFIndex::GetNamespaces(
 }
 
 void DebugNamesDWARFIndex::GetFunctions(
-    const Module::LookupInfo &lookup_info, SymbolFileDWARF &dwarf,
-    const CompilerDeclContext &parent_decl_ctx,
+    ConstString name, SymbolFileDWARF &dwarf,
+    const CompilerDeclContext &parent_decl_ctx, uint32_t name_type_mask,
     llvm::function_ref<bool(DWARFDIE die)> callback) {
-  ConstString name = lookup_info.GetLookupName();
+
   std::set<DWARFDebugInfoEntry *> seen;
   for (const DebugNames::Entry &entry :
        m_debug_names_up->equal_range(name.GetStringRef())) {
@@ -250,8 +250,8 @@ void DebugNamesDWARFIndex::GetFunctions(
       continue;
 
     if (llvm::Optional<DIERef> ref = ToDIERef(entry)) {
-      if (!ProcessFunctionDIE(lookup_info, *ref, dwarf, parent_decl_ctx,
-                              [&](DWARFDIE die) {
+      if (!ProcessFunctionDIE(name.GetStringRef(), *ref, dwarf, parent_decl_ctx,
+                              name_type_mask, [&](DWARFDIE die) {
                                 if (!seen.insert(die.GetDIE()).second)
                                   return true;
                                 return callback(die);
@@ -260,7 +260,8 @@ void DebugNamesDWARFIndex::GetFunctions(
     }
   }
 
-  m_fallback.GetFunctions(lookup_info, dwarf, parent_decl_ctx, callback);
+  m_fallback.GetFunctions(name, dwarf, parent_decl_ctx, name_type_mask,
+                          callback);
 }
 
 void DebugNamesDWARFIndex::GetFunctions(

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.h b/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.h
index a0880c6d50eb8..c451ccd4857fa 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.h
@@ -46,9 +46,9 @@ class DebugNamesDWARFIndex : public DWARFIndex {
                 llvm::function_ref<bool(DWARFDIE die)> callback) override;
   void GetNamespaces(ConstString name,
                      llvm::function_ref<bool(DWARFDIE die)> callback) override;
-  void GetFunctions(const Module::LookupInfo &lookup_info,
-                    SymbolFileDWARF &dwarf,
+  void GetFunctions(ConstString name, SymbolFileDWARF &dwarf,
                     const CompilerDeclContext &parent_decl_ctx,
+                    uint32_t name_type_mask,
                     llvm::function_ref<bool(DWARFDIE die)> callback) override;
   void GetFunctions(const RegularExpression &regex,
                     llvm::function_ref<bool(DWARFDIE die)> callback) override;

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp b/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
index 86e5653dc27ff..b743c84c10e01 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
@@ -411,12 +411,10 @@ void ManualDWARFIndex::GetNamespaces(
 }
 
 void ManualDWARFIndex::GetFunctions(
-    const Module::LookupInfo &lookup_info, SymbolFileDWARF &dwarf,
-    const CompilerDeclContext &parent_decl_ctx,
+    ConstString name, SymbolFileDWARF &dwarf,
+    const CompilerDeclContext &parent_decl_ctx, uint32_t name_type_mask,
     llvm::function_ref<bool(DWARFDIE die)> callback) {
   Index();
-  ConstString name = lookup_info.GetLookupName();
-  FunctionNameType name_type_mask = lookup_info.GetNameTypeMask();
 
   if (name_type_mask & eFunctionNameTypeFull) {
     if (!m_set.function_fullnames.Find(

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.h b/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.h
index d95cf501face8..5c5e43de9ca65 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.h
@@ -46,9 +46,9 @@ class ManualDWARFIndex : public DWARFIndex {
                 llvm::function_ref<bool(DWARFDIE die)> callback) override;
   void GetNamespaces(ConstString name,
                      llvm::function_ref<bool(DWARFDIE die)> callback) override;
-  void GetFunctions(const Module::LookupInfo &lookup_info,
-                    SymbolFileDWARF &dwarf,
+  void GetFunctions(ConstString name, SymbolFileDWARF &dwarf,
                     const CompilerDeclContext &parent_decl_ctx,
+                    uint32_t name_type_mask,
                     llvm::function_ref<bool(DWARFDIE die)> callback) override;
   void GetFunctions(const RegularExpression &regex,
                     llvm::function_ref<bool(DWARFDIE die)> callback) override;

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index af74a7bb4b146..9d68cb1e7b1b9 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -862,27 +862,6 @@ Function *SymbolFileDWARF::ParseFunction(CompileUnit &comp_unit,
   return dwarf_ast->ParseFunctionFromDWARF(comp_unit, die, func_range);
 }
 
-ConstString
-SymbolFileDWARF::ConstructFunctionDemangledName(const DWARFDIE &die) {
-  ASSERT_MODULE_LOCK(this);
-  if (!die.IsValid()) {
-    return ConstString();
-  }
-
-  auto type_system_or_err = GetTypeSystemForLanguage(GetLanguage(*die.GetCU()));
-  if (auto err = type_system_or_err.takeError()) {
-    LLDB_LOG_ERROR(GetLog(LLDBLog::Symbols), std::move(err),
-                   "Unable to construct demangled name for function");
-    return ConstString();
-  }
-
-  DWARFASTParser *dwarf_ast = type_system_or_err->GetDWARFParser();
-  if (!dwarf_ast)
-    return ConstString();
-
-  return dwarf_ast->ConstructDemangledNameFromDWARF(die);
-}
-
 lldb::addr_t SymbolFileDWARF::FixupAddress(lldb::addr_t file_addr) {
   SymbolFileDWARFDebugMap *debug_map_symfile = GetDebugMapSymfile();
   if (debug_map_symfile)
@@ -2331,13 +2310,12 @@ bool SymbolFileDWARF::DIEInDeclContext(const CompilerDeclContext &decl_ctx,
   return false;
 }
 
-void SymbolFileDWARF::FindFunctions(const Module::LookupInfo &lookup_info,
+void SymbolFileDWARF::FindFunctions(ConstString name,
                                     const CompilerDeclContext &parent_decl_ctx,
+                                    FunctionNameType name_type_mask,
                                     bool include_inlines,
                                     SymbolContextList &sc_list) {
   std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
-  ConstString name = lookup_info.GetLookupName();
-  FunctionNameType name_type_mask = lookup_info.GetNameTypeMask();
   LLDB_SCOPED_TIMERF("SymbolFileDWARF::FindFunctions (name = '%s')",
                      name.AsCString());
 
@@ -2369,11 +2347,12 @@ void SymbolFileDWARF::FindFunctions(const Module::LookupInfo &lookup_info,
 
   llvm::DenseSet<const DWARFDebugInfoEntry *> resolved_dies;
 
-  m_index->GetFunctions(lookup_info, *this, parent_decl_ctx, [&](DWARFDIE die) {
-    if (resolved_dies.insert(die.GetDIE()).second)
-      ResolveFunction(die, include_inlines, sc_list);
-    return true;
-  });
+  m_index->GetFunctions(name, *this, parent_decl_ctx, name_type_mask,
+                        [&](DWARFDIE die) {
+                          if (resolved_dies.insert(die.GetDIE()).second)
+                            ResolveFunction(die, include_inlines, sc_list);
+                          return true;
+                        });
 
   // Return the number of variable that were appended to the list
   const uint32_t num_matches = sc_list.GetSize() - original_size;

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
index 235fa7c8ef506..cfd18f02053b4 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -178,8 +178,9 @@ class SymbolFileDWARF : public lldb_private::SymbolFileCommon,
                            uint32_t max_matches,
                            lldb_private::VariableList &variables) override;
 
-  void FindFunctions(const lldb_private::Module::LookupInfo &lookup_info,
+  void FindFunctions(lldb_private::ConstString name,
                      const lldb_private::CompilerDeclContext &parent_decl_ctx,
+                     lldb::FunctionNameType name_type_mask,
                      bool include_inlines,
                      lldb_private::SymbolContextList &sc_list) override;
 
@@ -328,8 +329,6 @@ class SymbolFileDWARF : public lldb_private::SymbolFileCommon,
     return m_parse_time;
   }
 
-  lldb_private::ConstString ConstructFunctionDemangledName(const DWARFDIE &die);
-
 protected:
   typedef llvm::DenseMap<const DWARFDebugInfoEntry *, lldb_private::Type *>
       DIEToTypePtr;

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
index 7bc6aaee8b6bf..7637726892a08 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
@@ -1004,17 +1004,17 @@ static void RemoveFunctionsWithModuleNotEqualTo(const ModuleSP &module_sp,
 }
 
 void SymbolFileDWARFDebugMap::FindFunctions(
-    const Module::LookupInfo &lookup_info,
-    const CompilerDeclContext &parent_decl_ctx, bool include_inlines,
+    ConstString name, const CompilerDeclContext &parent_decl_ctx,
+    FunctionNameType name_type_mask, bool include_inlines,
     SymbolContextList &sc_list) {
   std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   LLDB_SCOPED_TIMERF("SymbolFileDWARFDebugMap::FindFunctions (name = %s)",
-                     lookup_info.GetLookupName().GetCString());
+                     name.GetCString());
 
   ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool {
     uint32_t sc_idx = sc_list.GetSize();
-    oso_dwarf->FindFunctions(lookup_info, parent_decl_ctx, include_inlines,
-                             sc_list);
+    oso_dwarf->FindFunctions(name, parent_decl_ctx, name_type_mask,
+                             include_inlines, sc_list);
     if (!sc_list.IsEmpty()) {
       RemoveFunctionsWithModuleNotEqualTo(m_objfile_sp->GetModule(), sc_list,
                                           sc_idx);

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
index 10a188f4943de..52c4d77a10b63 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
@@ -109,8 +109,9 @@ class SymbolFileDWARFDebugMap : public lldb_private::SymbolFileCommon {
   void FindGlobalVariables(const lldb_private::RegularExpression &regex,
                            uint32_t max_matches,
                            lldb_private::VariableList &variables) override;
-  void FindFunctions(const lldb_private::Module::LookupInfo &lookup_info,
+  void FindFunctions(lldb_private::ConstString name,
                      const lldb_private::CompilerDeclContext &parent_decl_ctx,
+                     lldb::FunctionNameType name_type_mask,
                      bool include_inlines,
                      lldb_private::SymbolContextList &sc_list) override;
   void FindFunctions(const lldb_private::RegularExpression &regex,

diff  --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
index 3325af61ae632..fbaea3328336b 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
@@ -1563,12 +1563,10 @@ void SymbolFileNativePDB::FindGlobalVariables(
 }
 
 void SymbolFileNativePDB::FindFunctions(
-    const Module::LookupInfo &lookup_info,
-    const CompilerDeclContext &parent_decl_ctx, bool include_inlines,
+    ConstString name, const CompilerDeclContext &parent_decl_ctx,
+    FunctionNameType name_type_mask, bool include_inlines,
     SymbolContextList &sc_list) {
   std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
-  ConstString name = lookup_info.GetLookupName();
-  FunctionNameType name_type_mask = lookup_info.GetNameTypeMask();
   // For now we only support lookup by method name or full name.
   if (!(name_type_mask & eFunctionNameTypeFull ||
         name_type_mask & eFunctionNameTypeMethod))

diff  --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
index 4bb37d9e76754..187791b0fd014 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
@@ -130,8 +130,9 @@ class SymbolFileNativePDB : public SymbolFileCommon {
   void GetTypes(SymbolContextScope *sc_scope, lldb::TypeClass type_mask,
                 TypeList &type_list) override;
 
-  void FindFunctions(const Module::LookupInfo &lookup_info,
+  void FindFunctions(ConstString name,
                      const CompilerDeclContext &parent_decl_ctx,
+                     lldb::FunctionNameType name_type_mask,
                      bool include_inlines, SymbolContextList &sc_list) override;
 
   void FindFunctions(const RegularExpression &regex, bool include_inlines,

diff  --git a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
index da97507235435..baa48532864bb 100644
--- a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
@@ -1305,13 +1305,11 @@ void SymbolFilePDB::CacheFunctionNames() {
 }
 
 void SymbolFilePDB::FindFunctions(
-    const lldb_private::Module::LookupInfo &lookup_info,
+    lldb_private::ConstString name,
     const lldb_private::CompilerDeclContext &parent_decl_ctx,
-    bool include_inlines,
+    FunctionNameType name_type_mask, bool include_inlines,
     lldb_private::SymbolContextList &sc_list) {
   std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
-  ConstString name = lookup_info.GetLookupName();
-  FunctionNameType name_type_mask = lookup_info.GetNameTypeMask();
   lldbassert((name_type_mask & eFunctionNameTypeAuto) == 0);
 
   if (name_type_mask == eFunctionNameTypeNone)

diff  --git a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
index 1292bbee91712..5d4b51ba2e19d 100644
--- a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
+++ b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
@@ -119,8 +119,9 @@ class SymbolFilePDB : public lldb_private::SymbolFileCommon {
                            uint32_t max_matches,
                            lldb_private::VariableList &variables) override;
 
-  void FindFunctions(const lldb_private::Module::LookupInfo &lookup_info,
+  void FindFunctions(lldb_private::ConstString name,
                      const lldb_private::CompilerDeclContext &parent_decl_ctx,
+                     lldb::FunctionNameType name_type_mask,
                      bool include_inlines,
                      lldb_private::SymbolContextList &sc_list) override;
 

diff  --git a/lldb/source/Symbol/SymbolFile.cpp b/lldb/source/Symbol/SymbolFile.cpp
index 362f6ba20bf31..e69150e9a356d 100644
--- a/lldb/source/Symbol/SymbolFile.cpp
+++ b/lldb/source/Symbol/SymbolFile.cpp
@@ -120,8 +120,9 @@ void SymbolFile::FindGlobalVariables(const RegularExpression &regex,
                                      uint32_t max_matches,
                                      VariableList &variables) {}
 
-void SymbolFile::FindFunctions(const Module::LookupInfo &lookup_info,
+void SymbolFile::FindFunctions(ConstString name,
                                const CompilerDeclContext &parent_decl_ctx,
+                               lldb::FunctionNameType name_type_mask,
                                bool include_inlines,
                                SymbolContextList &sc_list) {}
 

diff  --git a/lldb/source/Symbol/SymbolFileOnDemand.cpp b/lldb/source/Symbol/SymbolFileOnDemand.cpp
index b4c9ed002a8ea..b97bc5460daf3 100644
--- a/lldb/source/Symbol/SymbolFileOnDemand.cpp
+++ b/lldb/source/Symbol/SymbolFileOnDemand.cpp
@@ -375,11 +375,9 @@ void SymbolFileOnDemand::FindFunctions(const RegularExpression &regex,
 }
 
 void SymbolFileOnDemand::FindFunctions(
-    const Module::LookupInfo &lookup_info,
-    const CompilerDeclContext &parent_decl_ctx, bool include_inlines,
+    ConstString name, const CompilerDeclContext &parent_decl_ctx,
+    FunctionNameType name_type_mask, bool include_inlines,
     SymbolContextList &sc_list) {
-  ConstString name = lookup_info.GetLookupName();
-  FunctionNameType name_type_mask = lookup_info.GetNameTypeMask();
   if (!m_debug_info_enabled) {
     Log *log = GetLog();
 
@@ -404,7 +402,7 @@ void SymbolFileOnDemand::FindFunctions(
     // allow the FindFucntions to go through.
     SetLoadDebugInfoEnabled();
   }
-  return m_sym_file_impl->FindFunctions(lookup_info, parent_decl_ctx,
+  return m_sym_file_impl->FindFunctions(name, parent_decl_ctx, name_type_mask,
                                         include_inlines, sc_list);
 }
 

diff  --git a/lldb/tools/lldb-test/lldb-test.cpp b/lldb/tools/lldb-test/lldb-test.cpp
index 5c7b12823771d..c0dd95d3aff6e 100644
--- a/lldb/tools/lldb-test/lldb-test.cpp
+++ b/lldb/tools/lldb-test/lldb-test.cpp
@@ -505,9 +505,8 @@ Error opts::symbols::findFunctions(lldb_private::Module &Module) {
         ContextOr->IsValid() ? *ContextOr : CompilerDeclContext();
 
     List.Clear();
-    Module::LookupInfo lookup_info(ConstString(Name), getFunctionNameFlags(),
-                                   eLanguageTypeUnknown);
-    Symfile.FindFunctions(lookup_info, ContextPtr, true, List);
+    Symfile.FindFunctions(ConstString(Name), ContextPtr, getFunctionNameFlags(),
+                         true, List);
   }
   outs() << formatv("Found {0} functions:\n", List.GetSize());
   StreamString Stream;


        


More information about the lldb-commits mailing list