19 TupleFrontEnd(ValueObject &valobj) : SyntheticChildrenFrontEnd(valobj) {
23 llvm::Expected<size_t> GetIndexOfChildWithName(ConstString name)
override {
26 return llvm::createStringError(
"Type has no child named '%s'",
34 return m_elements.size();
44 std::vector<ValueObject*> m_elements;
45 ValueObject* m_base =
nullptr;
57 base_sp = m_backend.GetChildMemberWithName(
"base_");
61 m_base = base_sp.get();
62 m_elements.assign(base_sp->GetCompilerType().GetNumDirectBaseClasses(),
68 if (idx >= m_elements.size())
73 return m_elements[idx]->GetSP();
75 CompilerType holder_type =
86 elem_sp->Clone(ConstString(llvm::formatv(
"[{0}]", idx).str())).get();
89 return m_elements[idx]->GetSP();
93SyntheticChildrenFrontEnd *
97 return new TupleFrontEnd(*valobj_sp);
static std::optional< size_t > CalculateNumChildren(CompilerType container_elem_type, uint64_t num_elements, CompilerType element_type)
Calculates the number of elements stored in a container (with element type 'container_elem_type') as ...
CompilerType GetDirectBaseClassAtIndex(size_t idx, uint32_t *bit_offset_ptr) const
const char * AsCString(const char *value_if_empty=nullptr) const
Get the string value as a C string.
const char * GetCString() const
Get the string value as a C string.
virtual lldb::ValueObjectSP GetChildAtIndex(uint32_t idx, bool can_create=true)
CompilerType GetCompilerType()
virtual lldb::ValueObjectSP GetChildMemberWithName(llvm::StringRef name, bool can_create=true)
A class that represents a running process on the host machine.
ChildCacheState
Specifies if children need to be re-computed after a call to SyntheticChildrenFrontEnd::Update.
@ eRefetch
Children need to be recomputed dynamically.
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP