summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ValueObjectMemory.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2019-01-28 21:44:35 +0000
committerAdrian Prantl <aprantl@apple.com>2019-01-28 21:44:35 +0000
commit2a56e97f741bf8fefa68692304a29c64f37c65b7 (patch)
treea2d623c9221d10d9087496e40315fa65df19b790 /lldb/source/Core/ValueObjectMemory.cpp
parent390ac61b930e745c4a7130a20ede62aa2370ffc0 (diff)
downloadbcm5719-llvm-2a56e97f741bf8fefa68692304a29c64f37c65b7.tar.gz
bcm5719-llvm-2a56e97f741bf8fefa68692304a29c64f37c65b7.zip
Revert "Make Type::GetByteSize optional (NFC)"
This reverts commit r352394 because it broke three windows-specific tests. llvm-svn: 352434
Diffstat (limited to 'lldb/source/Core/ValueObjectMemory.cpp')
-rw-r--r--lldb/source/Core/ValueObjectMemory.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Core/ValueObjectMemory.cpp b/lldb/source/Core/ValueObjectMemory.cpp
index 42d1263b390..68e58ab1305 100644
--- a/lldb/source/Core/ValueObjectMemory.cpp
+++ b/lldb/source/Core/ValueObjectMemory.cpp
@@ -136,8 +136,10 @@ size_t ValueObjectMemory::CalculateNumChildren(uint32_t max) {
uint64_t ValueObjectMemory::GetByteSize() {
if (m_type_sp)
- return m_type_sp->GetByteSize().getValueOr(0);
- return m_compiler_type.GetByteSize(nullptr).getValueOr(0);
+ return m_type_sp->GetByteSize();
+ if (llvm::Optional<uint64_t> size = m_compiler_type.GetByteSize(nullptr))
+ return *size;
+ return 0;
}
lldb::ValueType ValueObjectMemory::GetValueType() const {
OpenPOWER on IntegriCloud