Skip to content

Commit 2dad717

Browse files
committed
[UpdateTestChecks] Fix invalid python string escapes
1 parent 119b436 commit 2dad717

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/utils/UpdateTestChecks/common.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ def invoke_tool(exe, cmd_args, ir):
4545

4646
##### LLVM IR parser
4747

48-
RUN_LINE_RE = re.compile('^\s*[;#]\s*RUN:\s*(.*)$')
49-
CHECK_PREFIX_RE = re.compile('--?check-prefix(?:es)?[= ](\S+)')
48+
RUN_LINE_RE = re.compile(r'^\s*[;#]\s*RUN:\s*(.*)$')
49+
CHECK_PREFIX_RE = re.compile(r'--?check-prefix(?:es)?[= ](\S+)')
5050
PREFIX_RE = re.compile('^[a-zA-Z0-9_-]+$')
5151
CHECK_RE = re.compile(r'^\s*[;#]\s*([^:]+?)(?:-NEXT|-NOT|-DAG|-LABEL)?:')
5252

@@ -60,7 +60,7 @@ def invoke_tool(exe, cmd_args, ir):
6060
r'\s*\n(?P<body>.*)$',
6161
flags=(re.X | re.S))
6262

63-
IR_FUNCTION_RE = re.compile('^\s*define\s+(?:internal\s+)?[^@]*@(\w+)\s*\(')
63+
IR_FUNCTION_RE = re.compile(r'^\s*define\s+(?:internal\s+)?[^@]*@(\w+)\s*\(')
6464
TRIPLE_IR_RE = re.compile(r'^\s*target\s+triple\s*=\s*"([^"]+)"$')
6565
TRIPLE_ARG_RE = re.compile(r'-mtriple[= ]([^ ]+)')
6666
MARCH_ARG_RE = re.compile(r'-march[= ]([^ ]+)')

0 commit comments

Comments
 (0)