[Lldb-commits] [PATCH] D122041: [llvm][utils] Fix llvm::Optional summary provider

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 21 10:03:25 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG826bdf51ff31: [lldb] Fix llvm::Optional summary provider (authored by kastiglione).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122041

Files:
  llvm/utils/lldbDataFormatters.py


Index: llvm/utils/lldbDataFormatters.py
===================================================================
--- llvm/utils/lldbDataFormatters.py
+++ llvm/utils/lldbDataFormatters.py
@@ -138,7 +138,11 @@
 
 def OptionalSummaryProvider(valobj, internal_dict):
     val = GetOptionalValue(valobj)
-    return val.summary if val else 'None'
+    if val is None:
+        return 'None'
+    if val.summary:
+        return val.summary
+    return ''
 
 class OptionalSynthProvider:
     """Provides deref support to llvm::Optional<T>"""


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122041.416999.patch
Type: text/x-patch
Size: 532 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220321/6eef3180/attachment.bin>


More information about the lldb-commits mailing list