49 return union_sp->GetChildMemberWithName(name);
53 return GetStorageMember(valobj,
"_Head");
56 return GetStorageMember(valobj,
"_Tail");
59std::optional<int64_t> GetIndexValue(
ValueObject &valobj) {
64 return {index_sp->GetValueAsSigned(-1)};
75 container_sp = container_sp->GetChildAtIndex(0);
79 for (int64_t i = 0; i < index; i++) {
80 container_sp = GetTail(*container_sp);
91 return valobj_sp->GetChildMemberWithName(
"_Which") !=
nullptr;
102 auto index = GetIndexValue(*valobj_sp);
107 stream.
Printf(
" No Value");
136 llvm::Expected<size_t> GetIndexOfChildWithName(
ConstString name)
override {
139 return llvm::createStringError(
"Type has no child named '%s'",
142 return *optional_idx;
157 auto index = GetIndexValue(m_backend);
158 if (index && *index >= 0)
164ValueObjectSP VariantFrontEnd::GetChildAtIndex(uint32_t idx) {
168 auto index = GetIndexValue(m_backend);
180 return head_sp->Clone(ConstString(
"Value"));
186 return new VariantFrontEnd(*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 ...
Generic representation of a type in a programming language.
CompilerType GetTypeTemplateArgument(size_t idx, bool expand_pack=false) const
ConstString GetDisplayTypeName() const
CompilerType GetTypedefedType() const
If the current object represents a typedef type, get the underlying type.
bool IsTypedefType() const
A uniqued constant string class.
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.
A stream class that can stream formatted output to a file.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
virtual lldb::ValueObjectSP GetChildAtIndex(uint32_t idx, bool can_create=true)
lldb::ValueObjectSP GetSP()
virtual lldb::ValueObjectSP GetChildMemberWithName(llvm::StringRef name, bool can_create=true)
virtual lldb::ValueObjectSP GetNonSyntheticValue()
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