[lldb] Fix llvm::Optional summary provider

Differential Revision: https://reviews.llvm.org/D122041
This commit is contained in:
Dave Lee 2022-03-18 14:20:44 -07:00
parent ee7324b898
commit 826bdf51ff
1 changed files with 5 additions and 1 deletions

View File

@ -138,7 +138,11 @@ def GetOptionalValue(valobj):
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>"""