Skip to content

Commit 608f140

Browse files
Merge pull request #8138 from PortalPete/apple/misc/ValueObject-index-path
[lldb] Improve (for posterity) and then remove unused `ValueObject::GetChildAtIndexPath(...)` methods
2 parents 7db3018 + b06ec5c commit 608f140

File tree

2 files changed

+1
-42
lines changed

2 files changed

+1
-42
lines changed

lldb/include/lldb/Core/ValueObject.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -473,15 +473,7 @@ class ValueObject {
473473
virtual lldb::ValueObjectSP GetChildAtIndex(size_t idx,
474474
bool can_create = true);
475475

476-
// this will always create the children if necessary
477-
lldb::ValueObjectSP GetChildAtIndexPath(llvm::ArrayRef<size_t> idxs,
478-
size_t *index_of_error = nullptr);
479-
480-
lldb::ValueObjectSP
481-
GetChildAtIndexPath(llvm::ArrayRef<std::pair<size_t, bool>> idxs,
482-
size_t *index_of_error = nullptr);
483-
484-
// this will always create the children if necessary
476+
// The method always creates missing children in the path, if necessary.
485477
lldb::ValueObjectSP GetChildAtNamePath(llvm::ArrayRef<llvm::StringRef> names);
486478

487479
lldb::ValueObjectSP

lldb/source/Core/ValueObject.cpp

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -479,39 +479,6 @@ ValueObjectSP ValueObject::GetChildAtIndex(size_t idx, bool can_create) {
479479
return child_sp;
480480
}
481481

482-
lldb::ValueObjectSP
483-
ValueObject::GetChildAtIndexPath(llvm::ArrayRef<size_t> idxs,
484-
size_t *index_of_error) {
485-
if (idxs.size() == 0)
486-
return GetSP();
487-
ValueObjectSP root(GetSP());
488-
for (size_t idx : idxs) {
489-
root = root->GetChildAtIndex(idx);
490-
if (!root) {
491-
if (index_of_error)
492-
*index_of_error = idx;
493-
return root;
494-
}
495-
}
496-
return root;
497-
}
498-
499-
lldb::ValueObjectSP ValueObject::GetChildAtIndexPath(
500-
llvm::ArrayRef<std::pair<size_t, bool>> idxs, size_t *index_of_error) {
501-
if (idxs.size() == 0)
502-
return GetSP();
503-
ValueObjectSP root(GetSP());
504-
for (std::pair<size_t, bool> idx : idxs) {
505-
root = root->GetChildAtIndex(idx.first, idx.second);
506-
if (!root) {
507-
if (index_of_error)
508-
*index_of_error = idx.first;
509-
return root;
510-
}
511-
}
512-
return root;
513-
}
514-
515482
lldb::ValueObjectSP
516483
ValueObject::GetChildAtNamePath(llvm::ArrayRef<llvm::StringRef> names) {
517484
if (names.size() == 0)

0 commit comments

Comments
 (0)