[Lldb-commits] [lldb] [lldb] Refactor LookupInfo object to be per-language (PR #168797)

Augusto Noronha via lldb-commits lldb-commits at lists.llvm.org
Sat Dec 6 12:20:36 PST 2025


================
@@ -917,8 +926,29 @@ class Module : public std::enable_shared_from_this<Module>,
   public:
     LookupInfo() = default;
 
-    LookupInfo(ConstString name, lldb::FunctionNameType name_type_mask,
-               lldb::LanguageType language);
+    /// Creates a vector of lookup infos for function name resolution.
+    ///
+    /// \param[in] name
+    ///     The function name to search for. This can be a simple name like
+    ///     "foo" or a qualified name like "Class::method".
+    ///
+    /// \param[in] name_type_mask
+    ///     A bitmask specifying what types of names to search for
+    ///     (e.g., eFunctionNameTypeFull, eFunctionNameTypeBase,
+    ///     eFunctionNameTypeMethod, eFunctionNameTypeAuto). Multiple types
+    ///     can be combined with bitwise OR.
+    ///
+    /// \param[in] lang_type
+    ///     The language to create lookups for. If eLanguageTypeUnknown is
+    ///     passed, creates one LookupInfo for each language plugin currently
+    ///     available in LLDB. If a specific language is provided, creates only
+    //      a single LookupInfo for that language.
----------------
augusto2112 wrote:

I took a look at this function's callers and, except the unknown case, none of the callers explicitly requests for a specific language, it's always threaded in from the caller's caller or as an ivar, which means that every single caller would need to handle the vector case anyway.

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


More information about the lldb-commits mailing list