summaryrefslogtreecommitdiffstats
path: root/llvm/utils/update_llc_test_checks.py
diff options
context:
space:
mode:
authorZvi Rackover <zvi.rackover@intel.com>2016-11-07 18:08:19 +0000
committerZvi Rackover <zvi.rackover@intel.com>2016-11-07 18:08:19 +0000
commit18082abfc2e59cbeff0273f937fc3e9f88e0c160 (patch)
treef01a399078918f4cb68cc2af1efca03a7084e8f4 /llvm/utils/update_llc_test_checks.py
parent1697d39eefda4d384724bd90c0e9e8d0540c55d1 (diff)
downloadbcm5719-llvm-18082abfc2e59cbeff0273f937fc3e9f88e0c160.tar.gz
bcm5719-llvm-18082abfc2e59cbeff0273f937fc3e9f88e0c160.zip
[X86] Fix test checks script to satisfy pyflakes
- Remove unused imports. - Initialize the variable 'name' before its (static) uses, and rename it to a more descriptive name. llvm-svn: 286128
Diffstat (limited to 'llvm/utils/update_llc_test_checks.py')
-rwxr-xr-xllvm/utils/update_llc_test_checks.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/utils/update_llc_test_checks.py b/llvm/utils/update_llc_test_checks.py
index 12faa806be4..8ac9968bb27 100755
--- a/llvm/utils/update_llc_test_checks.py
+++ b/llvm/utils/update_llc_test_checks.py
@@ -8,12 +8,10 @@ a single test function.
"""
import argparse
-import itertools
import os # Used to advertise this file's name ("autogenerated_note").
import string
import subprocess
import sys
-import tempfile
import re
# Invoke the tool that is being tested.
@@ -203,6 +201,7 @@ def main():
is_in_function = False
is_in_function_start = False
+ func_name = None
prefix_set = set([prefix for prefixes, _ in prefix_list for prefix in prefixes])
if args.verbose:
print >>sys.stderr, 'Rewriting FileCheck prefixes: %s' % (prefix_set,)
@@ -220,7 +219,7 @@ def main():
continue
# Print out the various check lines here.
- output_lines = add_checks(output_lines, prefix_list, func_dict, name)
+ output_lines = add_checks(output_lines, prefix_list, func_dict, func_name)
is_in_function_start = False
if is_in_function:
@@ -242,8 +241,8 @@ def main():
m = IR_FUNCTION_RE.match(input_line)
if not m:
continue
- name = m.group(1)
- if args.function is not None and name != args.function:
+ func_name = m.group(1)
+ if args.function is not None and func_name != args.function:
# When filtering on a specific function, skip all others.
continue
is_in_function = is_in_function_start = True
OpenPOWER on IntegriCloud