[polly] fix(polly/**.py): fix invalid escape sequences (PR #94037)
Eisuke Kawashima via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 10 15:27:08 PST 2024
https://github.com/e-kwsm updated https://github.com/llvm/llvm-project/pull/94037
>From f3e24ac1da6b6272cf30558d3bf79242971f37a8 Mon Sep 17 00:00:00 2001
From: Eisuke Kawashima <e-kwsm at users.noreply.github.com>
Date: Sat, 11 May 2024 02:39:21 +0900
Subject: [PATCH] fix(polly/**.py): fix invalid escape sequences
---
polly/test/update_check.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/polly/test/update_check.py b/polly/test/update_check.py
index 88d95c247c0630..a973c72ff4e78e 100644
--- a/polly/test/update_check.py
+++ b/polly/test/update_check.py
@@ -222,7 +222,12 @@ def classyfier2(lines):
line = i.__next__()
-replrepl = {"{{": "{{[{][{]}}", "}}": "{{[}][}]}}", "[[": "{{\[\[}}", "]]": "{{\]\]}}"}
+replrepl = {
+ "{{": "{{[{][{]}}",
+ "}}": "{{[}][}]}}",
+ "[[": r"{{\[\[}}",
+ "]]": r"{{\]\]}}",
+}
replre = re.compile("|".join(re.escape(k) for k in replrepl.keys()))
@@ -452,7 +457,7 @@ def main():
checkre = re.compile(
r"^\s*\;\s*("
+ "|".join([re.escape(s) for s in checkprefixes])
- + ")(\-NEXT|\-DAG|\-NOT|\-LABEL|\-SAME)?\s*\:"
+ + r")(\-NEXT|\-DAG|\-NOT|\-LABEL|\-SAME)?\s*\:"
)
firstcheckline = None
firstnoncommentline = None
More information about the llvm-commits
mailing list