[PATCH] D48461: [gdb] Update llvm::Optional
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 21 15:37:42 PDT 2018
MaskRay updated this revision to Diff 152393.
MaskRay added a comment.
.
Repository:
rL LLVM
https://reviews.llvm.org/D48461
Files:
utils/gdb-scripts/prettyprinters.py
Index: utils/gdb-scripts/prettyprinters.py
===================================================================
--- utils/gdb-scripts/prettyprinters.py
+++ utils/gdb-scripts/prettyprinters.py
@@ -124,12 +124,13 @@
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"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48461.152393.patch
Type: text/x-patch
Size: 947 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180621/29274d14/attachment.bin>
More information about the llvm-commits
mailing list