mirror of
https://github.com/intel/llvm.git
synced 2026-01-14 03:50:17 +08:00
Remove duplicated code for synthetic array members.
Summary: The code for GetSyntheticArrayMemberFromPointer and GetSyntheticArrayMemberFromArray was identical, so just collapse the the methods into one. Reviewers: granata.enrico, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7911 llvm-svn: 230708
This commit is contained in:
@@ -969,14 +969,7 @@ SBValue::GetChildAtIndex (uint32_t idx, lldb::DynamicValueType use_dynamic, bool
|
||||
child_sp = value_sp->GetChildAtIndex (idx, can_create);
|
||||
if (can_create_synthetic && !child_sp)
|
||||
{
|
||||
if (value_sp->IsPointerType())
|
||||
{
|
||||
child_sp = value_sp->GetSyntheticArrayMemberFromPointer(idx, can_create);
|
||||
}
|
||||
else if (value_sp->IsArrayType())
|
||||
{
|
||||
child_sp = value_sp->GetSyntheticArrayMemberFromArray(idx, can_create);
|
||||
}
|
||||
child_sp = value_sp->GetSyntheticArrayMember(idx, can_create);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user