diff options
Diffstat (limited to 'lldb/source/Core/ValueObjectVariable.cpp')
-rw-r--r-- | lldb/source/Core/ValueObjectVariable.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lldb/source/Core/ValueObjectVariable.cpp b/lldb/source/Core/ValueObjectVariable.cpp index f026d77c9fa..4d401c56249 100644 --- a/lldb/source/Core/ValueObjectVariable.cpp +++ b/lldb/source/Core/ValueObjectVariable.cpp @@ -112,9 +112,7 @@ uint64_t ValueObjectVariable::GetByteSize() { if (!type.IsValid()) return 0; - llvm::Optional<uint64_t> size = - type.GetByteSize(exe_ctx.GetBestExecutionContextScope()); - return size ? *size : 0; + return type.GetByteSize(exe_ctx.GetBestExecutionContextScope()).getValueOr(0); } lldb::ValueType ValueObjectVariable::GetValueType() const { |