diff --git a/llvm/utils/gdb-scripts/prettyprinters.py b/llvm/utils/gdb-scripts/prettyprinters.py index f778d98b4a96a1..1fdf4fe781c742 100644 --- a/llvm/utils/gdb-scripts/prettyprinters.py +++ b/llvm/utils/gdb-scripts/prettyprinters.py @@ -137,7 +137,7 @@ def __next__(self): self.val = None if not val['Storage']['hasVal']: raise StopIteration - return ('value', val['Storage']['value']) + return ('value', val['Storage']['val']) def to_string(self): return 'llvm::Optional{}'.format('' if self.val['Storage']['hasVal'] else ' is not initialized')