mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
Fix GDB pretty printer for Optional after r354246
llvm-svn: 361870
This commit is contained in:
parent
7fb6630c25
commit
12a22606f9
@ -129,8 +129,7 @@ class OptionalPrinter(Iterator):
|
|||||||
self.val = None
|
self.val = None
|
||||||
if not val['Storage']['hasVal']:
|
if not val['Storage']['hasVal']:
|
||||||
raise StopIteration
|
raise StopIteration
|
||||||
return ('value', val['Storage']['storage']['buffer'].address.cast(
|
return ('value', val['Storage']['value'])
|
||||||
val.type.template_argument(0).pointer()).dereference())
|
|
||||||
|
|
||||||
def to_string(self):
|
def to_string(self):
|
||||||
return 'llvm::Optional{}'.format('' if self.val['Storage']['hasVal'] else ' is not initialized')
|
return 'llvm::Optional{}'.format('' if self.val['Storage']['hasVal'] else ' is not initialized')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user