forked from OSchip/llvm-project
[lldb] Fix llvm::Optional summary provider
Differential Revision: https://reviews.llvm.org/D122041
This commit is contained in:
parent
ee7324b898
commit
826bdf51ff
|
@ -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>"""
|
||||
|
|
Loading…
Reference in New Issue