aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/UpdateTestChecks/common.py
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2023-12-23 14:07:47 +0100
committerNicolai Hähnle <nicolai.haehnle@amd.com>2024-03-08 03:58:11 +0100
commitfc1e5f978561d6357083f9b5bc981e52d93374b3 (patch)
treee660e4f4580dab6e01044e9808712cbb78c415b9 /llvm/utils/UpdateTestChecks/common.py
parent448419007e1bb8a9e2edfe2c1c87fef6d104442a (diff)
downloadllvm-fc1e5f978561d6357083f9b5bc981e52d93374b3.zip
llvm-fc1e5f978561d6357083f9b5bc981e52d93374b3.tar.gz
llvm-fc1e5f978561d6357083f9b5bc981e52d93374b3.tar.bz2
update_test_checks: simplify is_local_def_ir_value
The match argument is unused.
Diffstat (limited to 'llvm/utils/UpdateTestChecks/common.py')
-rw-r--r--llvm/utils/UpdateTestChecks/common.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py
index 5377752..72d21cf 100644
--- a/llvm/utils/UpdateTestChecks/common.py
+++ b/llvm/utils/UpdateTestChecks/common.py
@@ -933,7 +933,7 @@ class NamelessValue:
self.variable_mapping = {}
# Return true if this kind of IR value is "local", basically if it matches '%{{.*}}'.
- def is_local_def_ir_value_match(self, match):
+ def is_local_def_ir_value(self):
return self.ir_prefix == "%"
# Return true if this kind of IR value is "global", basically if it matches '#{{.*}}'.
@@ -949,7 +949,7 @@ class NamelessValue:
# Return the IR regexp we use for this kind or IR value, e.g., [\w.-]+? for locals
def get_ir_regex_from_ir_value_re_match(self, match):
# for backwards compatibility we check locals with '.*'
- if self.is_local_def_ir_value_match(match):
+ if self.is_local_def_ir_value():
return ".*"
return self.ir_regexp
@@ -990,7 +990,7 @@ class NamelessValue:
else:
regex = self.get_ir_regex_from_ir_value_re_match(match)
capture_start = "[["
- if self.is_local_def_ir_value_match(match):
+ if self.is_local_def_ir_value():
return capture_start + varname + ":" + prefix + regex + "]]"
return prefix + capture_start + varname + ":" + regex + "]]"
@@ -999,7 +999,7 @@ class NamelessValue:
if var_prefix is None:
var_prefix = self.check_prefix
capture_start = "[[#" if self.is_number else "[["
- if self.is_local_def_ir_value_match(match):
+ if self.is_local_def_ir_value():
return capture_start + self.get_value_name(var, var_prefix) + "]]"
prefix = self.get_ir_prefix_from_ir_value_match(match)[0]
return prefix + capture_start + self.get_value_name(var, var_prefix) + "]]"
@@ -1209,7 +1209,7 @@ def generalize_check_lines_common(
" with scripted FileCheck name." % (var,)
)
key = (var, nameless_value.check_key)
- is_local_def = nameless_value.is_local_def_ir_value_match(match)
+ is_local_def = nameless_value.is_local_def_ir_value()
if is_local_def and key in vars_seen:
rv = nameless_value.get_value_use(var, match)
elif not is_local_def and key in global_vars_seen: