diff options
| author | Serge Guelton <sguelton@quarkslab.com> | 2018-12-18 08:24:06 +0000 |
|---|---|---|
| committer | Serge Guelton <sguelton@quarkslab.com> | 2018-12-18 08:24:06 +0000 |
| commit | c5d97e3e356632223fa07fced992ddcbb15abb5d (patch) | |
| tree | 57c4071767796588b7ca0e1cf812c5d57ddb5ac7 /clang/utils/ABITest | |
| parent | 366c089bb3a0eb1d9cebceedf98f6f0518010447 (diff) | |
| download | bcm5719-llvm-c5d97e3e356632223fa07fced992ddcbb15abb5d.tar.gz bcm5719-llvm-c5d97e3e356632223fa07fced992ddcbb15abb5d.zip | |
Portable Python script across Python version
Replace `xrange(...)` by either `range(...)` or `list(range(...))` depending on the context.
Differential Revision: https://reviews.llvm.org/D55193
llvm-svn: 349448
Diffstat (limited to 'clang/utils/ABITest')
| -rw-r--r-- | clang/utils/ABITest/Enumeration.py | 2 | ||||
| -rw-r--r-- | clang/utils/ABITest/TypeGen.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/utils/ABITest/Enumeration.py b/clang/utils/ABITest/Enumeration.py index 01830a38cdf..29a81b4f13f 100644 --- a/clang/utils/ABITest/Enumeration.py +++ b/clang/utils/ABITest/Enumeration.py @@ -199,7 +199,7 @@ def getNthPairVariableBounds(N, bounds): raise ValueError("Invalid input (out of bounds)") level = 0 - active = range(len(bounds)) + active = list(range(len(bounds))) active.sort(key=lambda i: bounds[i]) prevLevel = 0 for i,index in enumerate(active): diff --git a/clang/utils/ABITest/TypeGen.py b/clang/utils/ABITest/TypeGen.py index 8330340cd3d..f8a4d07e11d 100644 --- a/clang/utils/ABITest/TypeGen.py +++ b/clang/utils/ABITest/TypeGen.py @@ -242,7 +242,7 @@ def combinations(values, k): # combinations, selections of a sequence if k==0: yield [] else: - for i in xrange(len(values)-k+1): + for i in range(len(values)-k+1): for cc in combinations(values[i+1:],k-1): yield [values[i]]+cc |

