forked from OSchip/llvm-project
Add an argument to ValueObject::GetSyntheticBase that allows for name customization on the generated value
llvm-svn: 268274
This commit is contained in:
parent
2664d45267
commit
fd4e5a8801
|
@ -705,7 +705,10 @@ public:
|
|||
ConstString name_const_str = ConstString());
|
||||
|
||||
virtual lldb::ValueObjectSP
|
||||
GetSyntheticBase (uint32_t offset, const CompilerType& type, bool can_create);
|
||||
GetSyntheticBase (uint32_t offset,
|
||||
const CompilerType& type,
|
||||
bool can_create,
|
||||
ConstString name_const_str = ConstString());
|
||||
|
||||
virtual lldb::ValueObjectSP
|
||||
GetDynamicValue (lldb::DynamicValueType valueType);
|
||||
|
|
|
@ -2227,13 +2227,19 @@ ValueObject::GetSyntheticChildAtOffset(uint32_t offset,
|
|||
}
|
||||
|
||||
ValueObjectSP
|
||||
ValueObject::GetSyntheticBase (uint32_t offset, const CompilerType& type, bool can_create)
|
||||
ValueObject::GetSyntheticBase (uint32_t offset,
|
||||
const CompilerType& type,
|
||||
bool can_create,
|
||||
ConstString name_const_str)
|
||||
{
|
||||
ValueObjectSP synthetic_child_sp;
|
||||
|
||||
char name_str[64];
|
||||
snprintf(name_str, sizeof(name_str), "%s", type.GetTypeName().AsCString("<unknown>"));
|
||||
ConstString name_const_str(name_str);
|
||||
if (name_const_str.IsEmpty())
|
||||
{
|
||||
char name_str[128];
|
||||
snprintf(name_str, sizeof(name_str), "base%s@%i", type.GetTypeName().AsCString("<unknown>"), offset);
|
||||
name_const_str.SetCString(name_str);
|
||||
}
|
||||
|
||||
// Check if we have already created a synthetic array member in this
|
||||
// valid object. If we have we will re-use it.
|
||||
|
|
Loading…
Reference in New Issue