浏览代码

[Utils] Fix gdb pretty printers to work with Python 3.

Reiterate D23202 for container printers added after the change landed.

Differential Revision: https://reviews.llvm.org/D46578

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336580 91177308-0d34-0410-b5e6-96231b3b80d8
Philip Pfaffe 7 年之前
父节点
当前提交
378d508446
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      utils/gdb-scripts/prettyprinters.py

+ 4 - 0
utils/gdb-scripts/prettyprinters.py

@@ -102,6 +102,8 @@ class ArrayRefPrinter:
   def __init__(self, val):
   def __init__(self, val):
     self.val = val
     self.val = val
 
 
+    __next__ = next
+
   def children(self):
   def children(self):
     data = self.val['Data']
     data = self.val['Data']
     return self._iterator(data, data + self.val['Length'])
     return self._iterator(data, data + self.val['Length'])
@@ -198,6 +200,8 @@ class DenseMapPrinter:
         self.first = False
         self.first = False
       return 'x', v
       return 'x', v
 
 
+    __next__ = next
+
   def __init__(self, val):
   def __init__(self, val):
     self.val = val
     self.val = val