Author: Adrian Prantl Date: 2025-04-22T12:59:13-07:00 New Revision: 66b2c343541a914e591aeae7091b97564cf534a7
URL: https://github.com/llvm/llvm-project/commit/66b2c343541a914e591aeae7091b97564cf534a7 DIFF: https://github.com/llvm/llvm-project/commit/66b2c343541a914e591aeae7091b97564cf534a7.diff LOG: [lldb] Clarify the documentation for GetIndexOfChildMemberWithName (#136633) Added: Modified: lldb/include/lldb/Symbol/CompilerType.h lldb/include/lldb/Symbol/TypeSystem.h Removed: ################################################################################ diff --git a/lldb/include/lldb/Symbol/CompilerType.h b/lldb/include/lldb/Symbol/CompilerType.h index 3561bc70887e6..671b5314c24a2 100644 --- a/lldb/include/lldb/Symbol/CompilerType.h +++ b/lldb/include/lldb/Symbol/CompilerType.h @@ -450,9 +450,13 @@ class CompilerType { /// Lookup a child member given a name. This function will match member names /// only and will descend into "clang_type" children in search for the first /// member in this class, or any base class that matches "name". + /// + /// \param child_indexes returns an index path for the result. + /// \returns 0 if unsuccessful, otherwise the length of the index path. + /// /// TODO: Return all matches for a given name by returning a - /// vector<vector<uint32_t>> - /// so we catch all names that match a given child name, not just the first. + /// vector<vector<uint32_t>> so we catch all names that match a + /// given child name, not just the first. size_t GetIndexOfChildMemberWithName(llvm::StringRef name, bool omit_empty_base_classes, diff --git a/lldb/include/lldb/Symbol/TypeSystem.h b/lldb/include/lldb/Symbol/TypeSystem.h index 59fb066e087d3..9e9edc09a0846 100644 --- a/lldb/include/lldb/Symbol/TypeSystem.h +++ b/lldb/include/lldb/Symbol/TypeSystem.h @@ -373,18 +373,10 @@ class TypeSystem : public PluginInterface, bool &child_is_base_class, bool &child_is_deref_of_parent, ValueObject *valobj, uint64_t &language_flags) = 0; - // Lookup a child given a name. This function will match base class names and - // member member names in "clang_type" only, not descendants. virtual uint32_t GetIndexOfChildWithName(lldb::opaque_compiler_type_t type, llvm::StringRef name, bool omit_empty_base_classes) = 0; - // Lookup a child member given a name. This function will match member names - // only and will descend into "clang_type" children in search for the first - // member in this class, or any base class that matches "name". - // TODO: Return all matches for a given name by returning a - // vector<vector<uint32_t>> - // so we catch all names that match a given child name, not just the first. virtual size_t GetIndexOfChildMemberWithName( lldb::opaque_compiler_type_t type, llvm::StringRef name, bool omit_empty_base_classes, std::vector<uint32_t> &child_indexes) = 0; _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits