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
diff --git a/clang/utils/modfuzz.py b/clang/utils/modfuzz.py
index 885621d..9486033 100644
--- a/clang/utils/modfuzz.py
+++ b/clang/utils/modfuzz.py
@@ -106,7 +106,7 @@
try:
while True:
assert m, 'got a failure with no steps; broken clang binary?'
- i = random.choice(range(len(m)))
+ i = random.choice(list(range(len(m))))
x = m[0:i] + m[i+1:]
m2 = CodeModel()
for d in x: