llvm.org GIT mirror llvm / b5a17e3
[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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310740 91177308-0d34-0410-b5e6-96231b3b80d8 Brian Gesiak 2 years ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
8080 def _reduce_memory_dict(old_dict):
8181 new_dict = dict()
82 for (k, v) in old_dict.iteritems():
82 for (k, v) in iteritems(old_dict):
8383 if type(k) is str:
8484 k = intern(k)