[Lldb-commits] [lldb] r351274 - Remove redundant check.

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 15 15:33:26 PST 2019


Author: adrian
Date: Tue Jan 15 15:33:26 2019
New Revision: 351274

URL: http://llvm.org/viewvc/llvm-project?rev=351274&view=rev
Log:
Remove redundant check.

Modified:
    lldb/trunk/source/Core/Value.cpp

Modified: lldb/trunk/source/Core/Value.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Value.cpp?rev=351274&r1=351273&r2=351274&view=diff
==============================================================================
--- lldb/trunk/source/Core/Value.cpp (original)
+++ lldb/trunk/source/Core/Value.cpp Tue Jan 15 15:33:26 2019
@@ -341,11 +341,9 @@ Status Value::GetValueAsData(ExecutionCo
 
     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))




More information about the lldb-commits mailing list