mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[gdb] Update llvm::Optional
Reviewers: dblaikie Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D48461 llvm-svn: 335303
This commit is contained in:
parent
b3e8dacd9e
commit
aefccfdf5d
@ -124,12 +124,13 @@ class OptionalPrinter:
|
||||
return ('value', self.member.dereference())
|
||||
|
||||
def children(self):
|
||||
if not self.value['hasVal']:
|
||||
if not self.value['Storage']['hasVal']:
|
||||
return self._iterator('', True)
|
||||
return self._iterator(self.value['storage']['buffer'].address.cast(self.value.type.template_argument(0).pointer()), False)
|
||||
return self._iterator(self.value['Storage']['storage']['buffer'].address.cast(
|
||||
self.value.type.template_argument(0).pointer()), False)
|
||||
|
||||
def to_string(self):
|
||||
return 'llvm::Optional is %sinitialized' % ('' if self.value['hasVal'] else 'not ')
|
||||
return 'llvm::Optional is %sinitialized' % ('' if self.value['Storage']['hasVal'] else 'not ')
|
||||
|
||||
class DenseMapPrinter:
|
||||
"Print a DenseMap"
|
||||
|
Loading…
Reference in New Issue
Block a user