[Lldb-commits] [PATCH] D131850: [LLDB][NFC] Reliability Fixes for FormatEntity

Slava Gurevich via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 15 10:17:07 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGfa5124327a01: [LLDB][NFC] Reliability Fixes for FormatEntity (authored by fixathon).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131850/new/

https://reviews.llvm.org/D131850

Files:
  lldb/source/Core/FormatEntity.cpp


Index: lldb/source/Core/FormatEntity.cpp
===================================================================
--- lldb/source/Core/FormatEntity.cpp
+++ lldb/source/Core/FormatEntity.cpp
@@ -711,9 +711,6 @@
     return false;
   }
 
-  if (valobj == nullptr)
-    return false;
-
   ValueObject::ExpressionPathAftermath what_next =
       (do_deref_pointer ? ValueObject::eExpressionPathAftermathDereference
                         : ValueObject::eExpressionPathAftermathNothing);
@@ -1695,7 +1692,7 @@
               llvm::StringRef var_representation;
               const char *var_name = var_value_sp->GetName().GetCString();
               if (var_value_sp->GetCompilerType().IsValid()) {
-                if (var_value_sp && exe_scope->CalculateTarget())
+                if (exe_scope && exe_scope->CalculateTarget())
                   var_value_sp =
                       var_value_sp->GetQualifiedRepresentationIfAvailable(
                           exe_scope->CalculateTarget()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131850.452730.patch
Type: text/x-patch
Size: 990 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220815/e5ba7e9f/attachment.bin>


More information about the lldb-commits mailing list