Skip to content

Commit

Permalink
[gdb] Update llvm::Optional
Browse files Browse the repository at this point in the history
Reviewers: dblaikie

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D48461

llvm-svn: 335303
  • Loading branch information
MaskRay committed Jun 21, 2018
1 parent a3593cb commit 53bbb90
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions llvm/utils/gdb-scripts/prettyprinters.py
Expand Up @@ -124,12 +124,13 @@ def next(self):
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"
Expand Down

0 comments on commit 53bbb90

Please sign in to comment.