[Lldb-commits] [lldb] Reland "[NFC][lldb] Speed up lookup of shared modules" (229d860) (PR #152607)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 8 09:11:32 PDT 2025


================
@@ -755,6 +755,235 @@ size_t ModuleList::GetIndexForModule(const Module *module) const {
 }
 
 namespace {
+/// A wrapper around ModuleList for shared modules. Provides fast lookups for
+/// file-based ModuleSpec queries.
+class SharedModuleList {
+public:
+  /// Finds all the modules matching the module_spec, and adds them to \p
+  /// matching_module_list.
+  void FindModules(const ModuleSpec &module_spec,
+                   ModuleList &matching_module_list) const {
----------------
JDevlieghere wrote:

Can this return the ModuleList instead of making it an out-parameter?

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


More information about the lldb-commits mailing list