summaryrefslogtreecommitdiff
path: root/lldb/source/Core/ValueObjectConstResult.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2020-07-25 18:42:04 -0700
committerEric Christopher <echristo@gmail.com>2020-07-25 18:42:04 -0700
commit4b14ef33e81c01632e848e7a67ccc6b11fb4c595 (patch)
treeb7dfdff5f0301284e74e74a098cf347fd4ae6647 /lldb/source/Core/ValueObjectConstResult.cpp
parent18975762c1974047baeeacb17879416410012a31 (diff)
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 1d9b860fb6a85df33fd52fcacc6a5efb421621bd.
Diffstat (limited to 'lldb/source/Core/ValueObjectConstResult.cpp')
-rw-r--r--lldb/source/Core/ValueObjectConstResult.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lldb/source/Core/ValueObjectConstResult.cpp b/lldb/source/Core/ValueObjectConstResult.cpp
index fd31ddc676b4..8d84f8e62ccc 100644
--- a/lldb/source/Core/ValueObjectConstResult.cpp
+++ b/lldb/source/Core/ValueObjectConstResult.cpp
@@ -179,7 +179,8 @@ ValueObjectSP ValueObjectConstResult::Create(ExecutionContextScope *exe_scope,
ValueObjectConstResult::ValueObjectConstResult(ExecutionContextScope *exe_scope,
ValueObjectManager &manager,
const Status &error)
- : ValueObject(exe_scope, manager), m_impl(this) {
+ : ValueObject(exe_scope, manager), m_type_name(), m_byte_size(0),
+ m_impl(this) {
m_error = error;
SetIsConstant();
}
@@ -188,7 +189,8 @@ ValueObjectConstResult::ValueObjectConstResult(ExecutionContextScope *exe_scope,
ValueObjectManager &manager,
const Value &value,
ConstString name, Module *module)
- : ValueObject(exe_scope, manager), m_impl(this) {
+ : ValueObject(exe_scope, manager), m_type_name(), m_byte_size(0),
+ m_impl(this) {
m_value = value;
m_name = name;
ExecutionContext exe_ctx;
@@ -206,9 +208,9 @@ lldb::ValueType ValueObjectConstResult::GetValueType() const {
return eValueTypeConstResult;
}
-llvm::Optional<uint64_t> ValueObjectConstResult::GetByteSize() {
+uint64_t ValueObjectConstResult::GetByteSize() {
ExecutionContext exe_ctx(GetExecutionContextRef());
- if (!m_byte_size) {
+ if (m_byte_size == 0) {
if (auto size =
GetCompilerType().GetByteSize(exe_ctx.GetBestExecutionContextScope()))
SetByteSize(*size);