[llvm] r361870 - Fix GDB pretty printer for Optional after r354246

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue May 28 13:22:16 PDT 2019


Author: dblaikie
Date: Tue May 28 13:22:16 2019
New Revision: 361870

URL: http://llvm.org/viewvc/llvm-project?rev=361870&view=rev
Log:
Fix GDB pretty printer for Optional after r354246

Modified:
    llvm/trunk/utils/gdb-scripts/prettyprinters.py

Modified: llvm/trunk/utils/gdb-scripts/prettyprinters.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gdb-scripts/prettyprinters.py?rev=361870&r1=361869&r2=361870&view=diff
==============================================================================
--- llvm/trunk/utils/gdb-scripts/prettyprinters.py (original)
+++ llvm/trunk/utils/gdb-scripts/prettyprinters.py Tue May 28 13:22:16 2019
@@ -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')




More information about the llvm-commits mailing list