mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[opt-viewer] Use Python 3-compatible iteritems
Summary: Replace a usage of a Python 2-specific `dict.iteritems()` with the Python 3-compatible definition provided at the top of the same file. Test Plan: Run `opt-viewer.py` using Python 3 and confirm it no longer encounters a runtime error when calling `dict.iteritems()`. Reviewers: anemet Reviewed By: anemet Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D36623 llvm-svn: 310740
This commit is contained in:
parent
b1f656c1ca
commit
21f9ea19cb
@ -80,7 +80,7 @@ class Remark(yaml.YAMLObject):
|
||||
|
||||
def _reduce_memory_dict(old_dict):
|
||||
new_dict = dict()
|
||||
for (k, v) in old_dict.iteritems():
|
||||
for (k, v) in iteritems(old_dict):
|
||||
if type(k) is str:
|
||||
k = intern(k)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user