Temporarily Revert "Unify the return value of GetByteSize to an llvm::Optional<uint64_t> (NFC-ish)"

as it's causing numerous (176) test failures on linux.

This reverts commit 1d9b860fb6.
This commit is contained in:
Eric Christopher
2020-07-25 18:42:04 -07:00
parent 18975762c1
commit 4b14ef33e8
24 changed files with 57 additions and 62 deletions

View File

@@ -1408,7 +1408,7 @@ ValueObjectSP GetValueForOffset(StackFrame &frame, ValueObjectSP &parent,
}
int64_t child_offset = child_sp->GetByteOffset();
int64_t child_size = child_sp->GetByteSize().getValueOr(0);
int64_t child_size = child_sp->GetByteSize();
if (offset >= child_offset && offset < (child_offset + child_size)) {
return GetValueForOffset(frame, child_sp, offset - child_offset);
@@ -1441,8 +1441,8 @@ ValueObjectSP GetValueForDereferincingOffset(StackFrame &frame,
}
if (offset >= 0 && uint64_t(offset) >= pointee->GetByteSize()) {
int64_t index = offset / pointee->GetByteSize().getValueOr(1);
offset = offset % pointee->GetByteSize().getValueOr(1);
int64_t index = offset / pointee->GetByteSize();
offset = offset % pointee->GetByteSize();
const bool can_create = true;
pointee = base->GetSyntheticArrayMember(index, can_create);
}