================
@@ -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.
----------------
felipepiovezan wrote:

I know I am a bit late to the party, but I think this is odd from an interface 
point of view. We could probably have two overloads: one which takes a 
LanguageType, and returns a _single_ LookupInfo,  and one which doesn't take a 
LanguageType, and returns a vector of LookupInfo.

As it stands, we are making all clients of this function handle vector types, 
which feels wrong, as it creates more code paths to check for (e.g. check that 
the vector is not empty, and check that the vector contains a single element). 
By having the specialized signature, we define all these runtime checks away.

https://github.com/llvm/llvm-project/pull/168797
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to