diff options
author | Adrian Prantl <aprantl@apple.com> | 2019-01-15 23:33:26 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2019-01-15 23:33:26 +0000 |
commit | 36d962d4960b6c814f747dcd9fe58011170b19d2 (patch) | |
tree | 2ac40453a370e8a5a1911384ba10e168e5d9263f | |
parent | b224940c170e81e7835eda9bd500c88d04dbb343 (diff) |
Remove redundant check.
-rw-r--r-- | lldb/source/Core/Value.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lldb/source/Core/Value.cpp b/lldb/source/Core/Value.cpp index b8f95de9393..8e18458b90c 100644 --- a/lldb/source/Core/Value.cpp +++ b/lldb/source/Core/Value.cpp @@ -341,11 +341,9 @@ Status Value::GetValueAsData(ExecutionContext *exe_ctx, DataExtractor &data, uint32_t limit_byte_size = UINT32_MAX; - if (ast_type.IsValid()) { - if (llvm::Optional<uint64_t> size = ast_type.GetByteSize( - exe_ctx ? exe_ctx->GetBestExecutionContextScope() : nullptr)) - limit_byte_size = *size; - } + if (llvm::Optional<uint64_t> size = ast_type.GetByteSize( + exe_ctx ? exe_ctx->GetBestExecutionContextScope() : nullptr)) + limit_byte_size = *size; if (limit_byte_size <= m_value.GetByteSize()) { if (m_value.GetData(data, limit_byte_size)) |