14#include "llvm/ADT/APSInt.h"
78 return m_num_elements;
87 uint64_t offset = idx * m_element_size;
88 offset = offset + m_start->GetValueAsUnsigned(0);
90 name.
Printf(
"[%" PRIu64
"]", (uint64_t)idx);
91 return CreateValueObjectFromAddress(name.
GetString(), offset,
92 m_backend.GetExecutionContextRef(),
101 if (!data_type_finder_sp)
104 m_element_type = data_type_finder_sp->GetCompilerType().GetPointeeType();
107 if (std::optional<uint64_t> size = m_element_type.GetByteSize(
nullptr)) {
108 m_element_size = *size;
111 if (m_element_size > 0) {
112 m_start = data_type_finder_sp.get();
118 m_num_elements = size_sp->GetValueAsUnsigned(0);
119 }
else if (
auto arg =
120 m_backend.GetCompilerType().GetIntegralTemplateArgument(1)) {
122 m_num_elements = arg->value.getLimitedValue();
Generic representation of a type in a programming language.
size_t GetNumTemplateArguments(bool expand_pack=false) const
Return the number of template arguments the type has.
A uniqued constant string class.
const char * GetCString() const
Get the string value as a C string.
llvm::StringRef GetString() const
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
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.
@ eReuse
Children did not change and don't need to be recomputed; re-use what we computed the last time we cal...
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP