[llvm] Fix update-test-checks.py on Python 3.6 (PR #93116)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 17:43:11 PDT 2024


https://github.com/efriedma-quic created https://github.com/llvm/llvm-project/pull/93116

re.Match apparently doesn't exist in older versions.

>From 8e8dd6c04bb181536687ab4605f25d3fdc7498d5 Mon Sep 17 00:00:00 2001
From: Eli Friedman <efriedma at quicinc.com>
Date: Wed, 22 May 2024 17:41:46 -0700
Subject: [PATCH] Fix update-test-checks.py on Python 3.6

re.Match apparently doesn't exist in older versions.
---
 llvm/utils/UpdateTestChecks/common.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py
index 7da16e0f0cb2e..85c129488d950 100644
--- a/llvm/utils/UpdateTestChecks/common.py
+++ b/llvm/utils/UpdateTestChecks/common.py
@@ -1041,7 +1041,7 @@ def get_value_name(self, var: str, check_prefix: str):
         var = var.replace("-", "_")
         return var.upper()
 
-    def get_affixes_from_match(self, match: re.Match):
+    def get_affixes_from_match(self, match):
         prefix = re.match(self.ir_prefix, match.group(2)).group(0)
         suffix = re.search(self.ir_suffix + "$", match.group(2)).group(0)
         return prefix, suffix



More information about the llvm-commits mailing list