Index: include/lldb/Core/ValueObject.h =================================================================== --- include/lldb/Core/ValueObject.h +++ include/lldb/Core/ValueObject.h @@ -27,6 +27,7 @@ #include "lldb/lldb-private-enumerations.h" // for AddressType #include "lldb/lldb-types.h" // for addr_t, offs... +#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" // for StringRef @@ -37,7 +38,6 @@ #include // for recursive_mutex #include // for string #include // for pair -#include #include // for size_t #include // for uint32_t @@ -489,35 +489,19 @@ virtual lldb::ValueObjectSP GetChildAtIndex(size_t idx, bool can_create); // this will always create the children if necessary - lldb::ValueObjectSP - GetChildAtIndexPath(const std::initializer_list &idxs, - size_t *index_of_error = nullptr); - - lldb::ValueObjectSP GetChildAtIndexPath(const std::vector &idxs, + lldb::ValueObjectSP GetChildAtIndexPath(llvm::ArrayRef idxs, size_t *index_of_error = nullptr); - lldb::ValueObjectSP GetChildAtIndexPath( - const std::initializer_list> &idxs, - size_t *index_of_error = nullptr); - lldb::ValueObjectSP - GetChildAtIndexPath(const std::vector> &idxs, + GetChildAtIndexPath(llvm::ArrayRef> idxs, size_t *index_of_error = nullptr); // this will always create the children if necessary - lldb::ValueObjectSP - GetChildAtNamePath(const std::initializer_list &names, - ConstString *name_of_error = nullptr); - - lldb::ValueObjectSP GetChildAtNamePath(const std::vector &names, + lldb::ValueObjectSP GetChildAtNamePath(llvm::ArrayRef names, ConstString *name_of_error = nullptr); - lldb::ValueObjectSP GetChildAtNamePath( - const std::initializer_list> &names, - ConstString *name_of_error = nullptr); - lldb::ValueObjectSP - GetChildAtNamePath(const std::vector> &names, + GetChildAtNamePath(llvm::ArrayRef> names, ConstString *name_of_error = nullptr); virtual lldb::ValueObjectSP GetChildMemberWithName(const ConstString &name, Index: source/Core/ValueObject.cpp =================================================================== --- source/Core/ValueObject.cpp +++ source/Core/ValueObject.cpp @@ -481,21 +481,8 @@ return child_sp; } -ValueObjectSP -ValueObject::GetChildAtIndexPath(const std::initializer_list &idxs, - size_t *index_of_error) { - return GetChildAtIndexPath(std::vector(idxs), index_of_error); -} - -ValueObjectSP ValueObject::GetChildAtIndexPath( - const std::initializer_list> &idxs, - size_t *index_of_error) { - return GetChildAtIndexPath(std::vector>(idxs), - index_of_error); -} - lldb::ValueObjectSP -ValueObject::GetChildAtIndexPath(const std::vector &idxs, +ValueObject::GetChildAtIndexPath(llvm::ArrayRef idxs, size_t *index_of_error) { if (idxs.size() == 0) return GetSP(); @@ -512,7 +499,7 @@ } lldb::ValueObjectSP ValueObject::GetChildAtIndexPath( - const std::vector> &idxs, size_t *index_of_error) { + llvm::ArrayRef> idxs, size_t *index_of_error) { if (idxs.size() == 0) return GetSP(); ValueObjectSP root(GetSP()); @@ -528,21 +515,8 @@ } lldb::ValueObjectSP -ValueObject::GetChildAtNamePath(const std::initializer_list &names, +ValueObject::GetChildAtNamePath(llvm::ArrayRef names, ConstString *name_of_error) { - return GetChildAtNamePath(std::vector(names), name_of_error); -} - -lldb::ValueObjectSP ValueObject::GetChildAtNamePath( - const std::initializer_list> &names, - ConstString *name_of_error) { - return GetChildAtNamePath(std::vector>(names), - name_of_error); -} - -lldb::ValueObjectSP -ValueObject::GetChildAtNamePath(const std::vector &names, - ConstString *name_of_error) { if (names.size() == 0) return GetSP(); ValueObjectSP root(GetSP()); @@ -558,7 +532,7 @@ } lldb::ValueObjectSP ValueObject::GetChildAtNamePath( - const std::vector> &names, + llvm::ArrayRef> names, ConstString *name_of_error) { if (names.size() == 0) return GetSP(); Index: source/Plugins/Language/CPlusPlus/LibCxx.cpp =================================================================== --- source/Plugins/Language/CPlusPlus/LibCxx.cpp +++ source/Plugins/Language/CPlusPlus/LibCxx.cpp @@ -395,7 +395,8 @@ if (!D) return false; - ValueObjectSP layout_decider(D->GetChildAtIndexPath({0, 0})); + ValueObjectSP layout_decider( + D->GetChildAtIndexPath(llvm::ArrayRef({0, 0}))); // this child should exist if (!layout_decider)