[llvm] 5747f9d - update_test_checks: simplify get_ir_regex
Nicolai Hähnle via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 7 18:58:51 PST 2024
Author: Nicolai Hähnle
Date: 2024-03-08T03:58:11+01:00
New Revision: 5747f9d3e9f3a49c27984b9341e123b9ca82e741
URL: https://github.com/llvm/llvm-project/commit/5747f9d3e9f3a49c27984b9341e123b9ca82e741
DIFF: https://github.com/llvm/llvm-project/commit/5747f9d3e9f3a49c27984b9341e123b9ca82e741.diff
LOG: update_test_checks: simplify get_ir_regex
The match argument isn't used.
Added:
Modified:
llvm/utils/UpdateTestChecks/common.py
Removed:
################################################################################
diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py
index 72d21cf4ca7dbc..a3365fef5f6e7d 100644
--- a/llvm/utils/UpdateTestChecks/common.py
+++ b/llvm/utils/UpdateTestChecks/common.py
@@ -947,7 +947,7 @@ def get_ir_prefix_from_ir_value_match(self, match):
return re.search(self.ir_prefix, match[0])[0], self.check_prefix
# 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):
+ def get_ir_regex(self):
# for backwards compatibility we check locals with '.*'
if self.is_local_def_ir_value():
return ".*"
@@ -988,7 +988,7 @@ def get_value_definition(self, var, match):
regex = "" # always capture a number in the default format
capture_start = "[[#"
else:
- regex = self.get_ir_regex_from_ir_value_re_match(match)
+ regex = self.get_ir_regex()
capture_start = "[["
if self.is_local_def_ir_value():
return capture_start + varname + ":" + prefix + regex + "]]"
More information about the llvm-commits
mailing list