summaryrefslogtreecommitdiffstats
path: root/llvm/utils/update_llc_test_checks.py
diff options
context:
space:
mode:
authorJames Y Knight <jyknight@google.com>2015-11-23 21:33:58 +0000
committerJames Y Knight <jyknight@google.com>2015-11-23 21:33:58 +0000
commit7c905063c576f5e12ce02f47c5d43da753931582 (patch)
treec871e0206eb581adfca21cecbb620a4310b2e11b /llvm/utils/update_llc_test_checks.py
parent7054ac1b8b2c798e39936160de689fa3246dc41b (diff)
downloadbcm5719-llvm-7c905063c576f5e12ce02f47c5d43da753931582.tar.gz
bcm5719-llvm-7c905063c576f5e12ce02f47c5d43da753931582.zip
Make utils/update_llc_test_checks.py note that the assertions are
autogenerated. Also update existing test cases which appear to be generated by it and weren't modified (other than addition of the header) by rerunning it. llvm-svn: 253917
Diffstat (limited to 'llvm/utils/update_llc_test_checks.py')
-rwxr-xr-xllvm/utils/update_llc_test_checks.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/utils/update_llc_test_checks.py b/llvm/utils/update_llc_test_checks.py
index df01d8973c4..cfdf830907f 100755
--- a/llvm/utils/update_llc_test_checks.py
+++ b/llvm/utils/update_llc_test_checks.py
@@ -73,6 +73,8 @@ def main():
flags=(re.M | re.S))
check_prefix_re = re.compile('--check-prefix=(\S+)')
check_re = re.compile(r'^\s*;\s*([^:]+?)(?:-NEXT|-NOT|-DAG|-LABEL)?:')
+ autogenerated_note = ('; NOTE: Assertions have been autogenerated by '
+ 'utils/update_llc_test_checks.py')
for test in args.tests:
if args.verbose:
@@ -136,7 +138,7 @@ def main():
if f in asm[prefix] and asm[prefix][f] != f_asm:
if prefix == prefixes[-1]:
print >>sys.stderr, ('WARNING: Found conflicting asm under the '
- 'same prefix!')
+ 'same prefix: %r!' % (prefix,))
else:
asm[prefix][f] = None
continue
@@ -149,6 +151,8 @@ def main():
if args.verbose:
print >>sys.stderr, 'Rewriting FileCheck prefixes: %s' % (prefix_set,)
fixed_lines = []
+ fixed_lines.append(autogenerated_note)
+
for l in test_lines:
if is_in_function_start:
if l.lstrip().startswith(';'):
@@ -191,6 +195,8 @@ def main():
is_in_function = False
continue
+ if l == autogenerated_note:
+ continue
fixed_lines.append(l)
m = ir_function_re.match(l)
OpenPOWER on IntegriCloud