diff options
| author | Brian Gesiak <modocache@gmail.com> | 2017-08-11 18:02:07 +0000 |
|---|---|---|
| committer | Brian Gesiak <modocache@gmail.com> | 2017-08-11 18:02:07 +0000 |
| commit | 34f07f9e0e544a8369e9b548af909eda9461b055 (patch) | |
| tree | f29f61910ba705aa2ccc5cdcb8f86ef754d3e3cd | |
| parent | efd227f3c7ab1eda9d66816a3fcf0912781b76d8 (diff) | |
| download | bcm5719-llvm-34f07f9e0e544a8369e9b548af909eda9461b055.tar.gz bcm5719-llvm-34f07f9e0e544a8369e9b548af909eda9461b055.zip | |
[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
| -rw-r--r-- | llvm/tools/opt-viewer/optrecord.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/opt-viewer/optrecord.py b/llvm/tools/opt-viewer/optrecord.py index 2bf0f356d85..e84c83e2ce9 100644 --- a/llvm/tools/opt-viewer/optrecord.py +++ b/llvm/tools/opt-viewer/optrecord.py @@ -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) |

