[Lldb-commits] [lldb] 8ddf98a - [lldb] Remove unused GetChildAtIndexPath(...) methods from ValueObject.cpp (#75870)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Dec 19 15:01:00 PST 2023
Author: Pete Lawrence
Date: 2023-12-19T15:00:56-08:00
New Revision: 8ddf98ad4bb14867987b48a37dd29750c665112f
URL: https://github.com/llvm/llvm-project/commit/8ddf98ad4bb14867987b48a37dd29750c665112f
DIFF: https://github.com/llvm/llvm-project/commit/8ddf98ad4bb14867987b48a37dd29750c665112f.diff
LOG: [lldb] Remove unused GetChildAtIndexPath(...) methods from ValueObject.cpp (#75870)
This a follow-up PR from this other one:
https://github.com/llvm/llvm-project/pull/74413
Nothing calls into these two methods, so we (@DavidSpickett,
@adrian-prantl, and I) agreed to remove them once we merged the previous
PR.
Added:
Modified:
lldb/include/lldb/Core/ValueObject.h
lldb/source/Core/ValueObject.cpp
Removed:
################################################################################
diff --git a/lldb/include/lldb/Core/ValueObject.h b/lldb/include/lldb/Core/ValueObject.h
index a158199e7fab1a..3f8005ba696ce8 100644
--- a/lldb/include/lldb/Core/ValueObject.h
+++ b/lldb/include/lldb/Core/ValueObject.h
@@ -468,14 +468,6 @@ class ValueObject {
virtual lldb::ValueObjectSP GetChildAtIndex(size_t idx,
bool can_create = true);
- // The method always creates missing children in the path, if necessary.
- lldb::ValueObjectSP GetChildAtIndexPath(llvm::ArrayRef<size_t> idxs,
- size_t *index_of_error = nullptr);
-
- lldb::ValueObjectSP
- GetChildAtIndexPath(llvm::ArrayRef<std::pair<size_t, bool>> idxs,
- size_t *index_of_error = nullptr);
-
// The method always creates missing children in the path, if necessary.
lldb::ValueObjectSP GetChildAtNamePath(llvm::ArrayRef<llvm::StringRef> names);
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index b82e6082eebddf..b2a6d9412ab40b 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -392,46 +392,6 @@ ValueObjectSP ValueObject::GetChildAtIndex(size_t idx, bool can_create) {
return child_sp;
}
-lldb::ValueObjectSP
-ValueObject::GetChildAtIndexPath(llvm::ArrayRef<size_t> idxs,
- size_t *index_of_error) {
- if (idxs.size() == 0)
- return GetSP();
- ValueObjectSP root(GetSP());
-
- size_t current_index = 0;
- for (size_t idx : idxs) {
- root = root->GetChildAtIndex(idx);
- if (!root) {
- if (index_of_error)
- *index_of_error = current_index;
- return root;
- }
- current_index += 1;
- }
- return root;
-}
-
-lldb::ValueObjectSP ValueObject::GetChildAtIndexPath(
- llvm::ArrayRef<std::pair<size_t, bool>> idxs, size_t *index_of_error) {
- if (idxs.size() == 0)
- return GetSP();
- ValueObjectSP root(GetSP());
-
- size_t current_index = 0;
- for (std::pair<size_t, bool> idx : idxs) {
- root = root->GetChildAtIndex(idx.first, idx.second);
- if (!root) {
- if (index_of_error)
- *index_of_error = current_index;
- return root;
- }
-
- current_index += 1;
- }
- return root;
-}
-
lldb::ValueObjectSP
ValueObject::GetChildAtNamePath(llvm::ArrayRef<llvm::StringRef> names) {
if (names.size() == 0)
More information about the lldb-commits
mailing list