summaryrefslogtreecommitdiffstats
path: root/llvm/utils/gdb-scripts
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2019-05-28 20:22:16 +0000
committerDavid Blaikie <dblaikie@gmail.com>2019-05-28 20:22:16 +0000
commit4e68e878f19026999455f293a95a23d19164f53e (patch)
treefbb356c3274cbd498d1db898778dce9260fbe0f4 /llvm/utils/gdb-scripts
parent0dac476072df69a4136f2f82506c27232db4743c (diff)
downloadbcm5719-llvm-4e68e878f19026999455f293a95a23d19164f53e.tar.gz
bcm5719-llvm-4e68e878f19026999455f293a95a23d19164f53e.zip
Fix GDB pretty printer for Optional after r354246
llvm-svn: 361870
Diffstat (limited to 'llvm/utils/gdb-scripts')
-rw-r--r--llvm/utils/gdb-scripts/prettyprinters.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/utils/gdb-scripts/prettyprinters.py b/llvm/utils/gdb-scripts/prettyprinters.py
index 7ddc33acb20..55f2b369319 100644
--- a/llvm/utils/gdb-scripts/prettyprinters.py
+++ b/llvm/utils/gdb-scripts/prettyprinters.py
@@ -129,8 +129,7 @@ class OptionalPrinter(Iterator):
self.val = None
if not val['Storage']['hasVal']:
raise StopIteration
- return ('value', val['Storage']['storage']['buffer'].address.cast(
- val.type.template_argument(0).pointer()).dereference())
+ return ('value', val['Storage']['value'])
def to_string(self):
return 'llvm::Optional{}'.format('' if self.val['Storage']['hasVal'] else ' is not initialized')
OpenPOWER on IntegriCloud