Skip to content

[lldb] Clarify the documentation for GetIndexOfChildMemberWithName #136633

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lldb/include/lldb/Symbol/CompilerType.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 0 additions & 8 deletions lldb/include/lldb/Symbol/TypeSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading