mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[opt-viewer] Python 3 support in opt-diff.py
Summary: The `file()` builtin is not available in Python 3; use `open()` instead. https://docs.python.org/3.0/whatsnew/3.0.html#builtins Reviewers: anemet, davidxl, davide Reviewed By: davide Subscribers: davide, fhahn, llvm-commits Differential Revision: https://reviews.llvm.org/D34670 llvm-svn: 306423
This commit is contained in:
parent
32bf22f9d8
commit
03358f651a
@ -66,5 +66,5 @@ if __name__ == '__main__':
|
||||
r.Added = True
|
||||
for r in removed:
|
||||
r.Added = False
|
||||
stream = file(args.output, 'w')
|
||||
yaml.dump_all(added | removed, stream)
|
||||
with open(args.output, 'w') as stream:
|
||||
yaml.dump_all(added | removed, stream)
|
||||
|
Loading…
x
Reference in New Issue
Block a user