diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2024-10-04 16:31:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-04 16:31:42 +0200 |
commit | 9f3f76a6b443ace47b564d79192ca176de4dd236 (patch) | |
tree | f62068eabcd40d2dbf0f511d8f57b1a807e9f583 /llvm/utils/UpdateTestChecks/common.py | |
parent | bf488ed6e1fbe4c494a1dc0dd199a3d03405784e (diff) | |
download | llvm-9f3f76a6b443ace47b564d79192ca176de4dd236.zip llvm-9f3f76a6b443ace47b564d79192ca176de4dd236.tar.gz llvm-9f3f76a6b443ace47b564d79192ca176de4dd236.tar.bz2 |
update_test_checks: collect original check lines for old versions of lit tests (#111148)
Old versions of UTC produced function labels like:
; CHECK-LABEL: @func(
Fix the regular expression used when scanning for old check lines to
recognize this form of label.
This allows meta variable stability to apply when running UTC on tests
using this form of label.
Reported-by: Nikita Popov <npopov@redhat.com>
Diffstat (limited to 'llvm/utils/UpdateTestChecks/common.py')
-rw-r--r-- | llvm/utils/UpdateTestChecks/common.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py index 759fc5d..8ed600e 100644 --- a/llvm/utils/UpdateTestChecks/common.py +++ b/llvm/utils/UpdateTestChecks/common.py @@ -454,7 +454,7 @@ def collect_original_check_lines(ti: TestInfo, prefix_set: set): continue if check_kind == "LABEL": - m = IR_FUNCTION_RE.match(line) + m = IR_FUNCTION_LABEL_RE.match(line) if m is not None: func_name = m.group(1) if ( @@ -572,6 +572,9 @@ LOOP_PASS_DEBUG_RE = re.compile( ) IR_FUNCTION_RE = re.compile(r'^\s*define\s+(?:internal\s+)?[^@]*@"?([\w.$-]+)"?\s*\(') +IR_FUNCTION_LABEL_RE = re.compile( + r'^\s*(?:define\s+(?:internal\s+)?[^@]*)?@"?([\w.$-]+)"?\s*\(' +) TRIPLE_IR_RE = re.compile(r'^\s*target\s+triple\s*=\s*"([^"]+)"$') TRIPLE_ARG_RE = re.compile(r"-m?triple[= ]([^ ]+)") MARCH_ARG_RE = re.compile(r"-march[= ]([^ ]+)") |