aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/UpdateTestChecks/common.py
diff options
context:
space:
mode:
authorSebastian Neubauer <Sebastian.Neubauer@amd.com>2022-12-12 12:28:45 +0100
committerSebastian Neubauer <Sebastian.Neubauer@amd.com>2022-12-12 12:29:54 +0100
commita888825aeef8d6592c6cf5f4e5854cc39af49633 (patch)
tree79e110fe763d2af1a1074d0f4e048f7a05545762 /llvm/utils/UpdateTestChecks/common.py
parentbea45027b43ec61a3efc4b487ceca2da25504432 (diff)
downloadllvm-a888825aeef8d6592c6cf5f4e5854cc39af49633.zip
llvm-a888825aeef8d6592c6cf5f4e5854cc39af49633.tar.gz
llvm-a888825aeef8d6592c6cf5f4e5854cc39af49633.tar.bz2
[UpdateTestChecks] Match define for labels
Previously, the label also matched function calls with the function name, which caused tests to fail because the label matched on the wrong line. Add the `define` prefix, so only function defines are matched. Differential Revision: https://reviews.llvm.org/D139006
Diffstat (limited to 'llvm/utils/UpdateTestChecks/common.py')
-rw-r--r--llvm/utils/UpdateTestChecks/common.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py
index 6a2c2f4..7a66229 100644
--- a/llvm/utils/UpdateTestChecks/common.py
+++ b/llvm/utils/UpdateTestChecks/common.py
@@ -1028,7 +1028,7 @@ def add_ir_checks(output_lines, comment_marker, prefix_list, func_dict,
func_name, preserve_names, function_sig,
global_vars_seen_dict, is_filtered):
# Label format is based on IR string.
- function_def_regex = 'define {{[^@]+}}' if function_sig else ''
+ function_def_regex = 'define {{[^@]+}}'
check_label_format = '{} %s-LABEL: {}@%s%s%s'.format(comment_marker, function_def_regex)
return add_checks(output_lines, comment_marker, prefix_list, func_dict, func_name,
check_label_format, False, preserve_names, global_vars_seen_dict,