summaryrefslogtreecommitdiffstats
path: root/llvm/utils/gdb-scripts/prettyprinters.py
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2018-06-21 22:34:29 +0000
committerFangrui Song <maskray@google.com>2018-06-21 22:34:29 +0000
commit53bbb9071859b592c8b23deb79fe180e4cac315d (patch)
treeb96b7245b0dc9c0866f57f857dd96da65ee00a49 /llvm/utils/gdb-scripts/prettyprinters.py
parenta3593cb44b2b3efabfaacf85054e729bcd178e6f (diff)
downloadbcm5719-llvm-53bbb9071859b592c8b23deb79fe180e4cac315d.tar.gz
bcm5719-llvm-53bbb9071859b592c8b23deb79fe180e4cac315d.zip
[gdb] Update llvm::Optional
Reviewers: dblaikie Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D48461 llvm-svn: 335303
Diffstat (limited to 'llvm/utils/gdb-scripts/prettyprinters.py')
-rw-r--r--llvm/utils/gdb-scripts/prettyprinters.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/utils/gdb-scripts/prettyprinters.py b/llvm/utils/gdb-scripts/prettyprinters.py
index 1a549f875d4..2f9b688f768 100644
--- a/llvm/utils/gdb-scripts/prettyprinters.py
+++ b/llvm/utils/gdb-scripts/prettyprinters.py
@@ -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"
OpenPOWER on IntegriCloud