Allow using Debian's opt-8, opt-9 with update_test_checks.py
Patch by Shawn Landden!
Differential Revision: https://reviews.llvm.org/D61148
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360536
91177308-0d34-0410-b5e6-
96231b3b80d8
autogenerated_note = (ADVERT + 'utils/' + os.path.basename(__file__))
opt_basename = os.path.basename(args.opt_binary)
- if (opt_basename != "opt"):
+ if not re.match(r'^opt(-\d+)?$', opt_basename):
print('ERROR: Unexpected opt name: ' + opt_basename, file=sys.stderr)
sys.exit(1)
+ opt_basename = 'opt'
test_paths = [test for pattern in args.tests for test in glob.glob(pattern)]
for test in test_paths: