mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-23 19:59:48 +00:00
Fix GDB pretty printer for Optional after r354246
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361870 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9c16b5ded4
commit
49044733df
@ -129,8 +129,7 @@ class OptionalPrinter(Iterator):
|
||||
self.val = None
|
||||
if not val['Storage']['hasVal']:
|
||||
raise StopIteration
|
||||
return ('value', val['Storage']['storage']['buffer'].address.cast(
|
||||
val.type.template_argument(0).pointer()).dereference())
|
||||
return ('value', val['Storage']['value'])
|
||||
|
||||
def to_string(self):
|
||||
return 'llvm::Optional{}'.format('' if self.val['Storage']['hasVal'] else ' is not initialized')
|
||||
|
Loading…
Reference in New Issue
Block a user