1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00

[UpdateTestChecks][FIX] Python 2.7 compatibility and use right prefix

This commit is contained in:
Johannes Doerfert 2020-08-12 11:56:55 -05:00
parent 9b258b83db
commit fdfc525664

View File

@ -387,7 +387,7 @@ def genericize_check_lines(lines, is_analyze, vars_seen, global_vars_seen):
pre = get_ir_prefix_from_ir_value_match(match)
var = get_name_from_ir_value_match(match)
for nameless_value in nameless_values:
if re.fullmatch(nameless_value.ir_prefix + r'[0-9]+?', var, re.IGNORECASE):
if re.match(r'^' + nameless_value.check_prefix + r'[0-9]+?$', var, re.IGNORECASE):
warn("Change IR value name '%s' to prevent possible conflict with scripted FileCheck name." % (var,))
if (pre, var) in vars_seen or (pre, var) in global_vars_seen:
rv = get_value_use(var, match)