diff options
author | Serge Guelton <sguelton@quarkslab.com> | 2019-01-03 14:11:33 +0000 |
---|---|---|
committer | Serge Guelton <sguelton@quarkslab.com> | 2019-01-03 14:11:33 +0000 |
commit | 4a27478a5b8bd9f13fef65e66b291a352c532371 (patch) | |
tree | a086542fe11fba6d8779ca2fa96036d80af04312 /llvm/utils/llvm-gisel-cov.py | |
parent | 41f98c834bc62a605ec51032482369cfa128d711 (diff) | |
download | bcm5719-llvm-4a27478a5b8bd9f13fef65e66b291a352c532371.tar.gz bcm5719-llvm-4a27478a5b8bd9f13fef65e66b291a352c532371.zip |
Python compat - print statement
Make sure all print statements are compatible with Python 2 and Python3 using
the `from __future__ import print_function` statement.
Differential Revision: https://reviews.llvm.org/D56249
llvm-svn: 350307
Diffstat (limited to 'llvm/utils/llvm-gisel-cov.py')
-rw-r--r-- | llvm/utils/llvm-gisel-cov.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/utils/llvm-gisel-cov.py b/llvm/utils/llvm-gisel-cov.py index a74ed10f864..820fceab0d0 100644 --- a/llvm/utils/llvm-gisel-cov.py +++ b/llvm/utils/llvm-gisel-cov.py @@ -5,6 +5,7 @@ Summarize the information in the given coverage files. Emits the number of rules covered or the percentage of rules covered depending on whether --num-rules has been used to specify the total number of rules. """ +from __future__ import print_function import argparse import struct @@ -59,9 +60,9 @@ def main(): num_rules = dict(args.num_rules) for backend, rules_for_backend in covered_rules.items(): if backend in num_rules: - print "%s: %3.2f%% of rules covered" % (backend, (float(len(rules_for_backend.keys())) / num_rules[backend]) * 100) + print("%s: %3.2f%% of rules covered" % (backend, float(len(rules_for_backend)) / num_rules[backend]) * 100)) else: - print "%s: %d rules covered" % (backend, len(rules_for_backend.keys())) + print("%s: %d rules covered" % (backend, len(rules_for_backend))) if __name__ == '__main__': main() |