Skip to content

Commit 307b593

Browse files
author
git apple-llvm automerger
committed
Merge commit 'e919a83f96fe' from llvm.org/release/17.x into stable/20230725
2 parents 7fed1b8 + e919a83 commit 307b593

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def __init__(self, templateClasses):
2525

2626
def GeneratePrologue(self):
2727

28-
self.implementationContent += """
28+
self.implementationContent += r"""
2929
/*===- Generated file -------------------------------------------*- C++ -*-===*\
3030
|* *|
3131
|* Introspection of available AST node SourceLocations *|

compiler-rt/test/lit.common.cfg.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ def is_windows_lto_supported():
800800
config.substitutions.append(
801801
(
802802
"%ld_flags_rpath_exe" + postfix,
803-
"-Wl,-z,origin -Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec"
803+
r"-Wl,-z,origin -Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec"
804804
+ postfix,
805805
)
806806
)
@@ -809,15 +809,15 @@ def is_windows_lto_supported():
809809
config.substitutions.append(
810810
(
811811
"%ld_flags_rpath_exe" + postfix,
812-
"-Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec" + postfix,
812+
r"-Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec" + postfix,
813813
)
814814
)
815815
config.substitutions.append(("%ld_flags_rpath_so" + postfix, ""))
816816
elif config.host_os == "SunOS":
817817
config.substitutions.append(
818818
(
819819
"%ld_flags_rpath_exe" + postfix,
820-
"-Wl,-R\$ORIGIN -L%T -l%xdynamiclib_namespec" + postfix,
820+
r"-Wl,-R\$ORIGIN -L%T -l%xdynamiclib_namespec" + postfix,
821821
)
822822
)
823823
config.substitutions.append(("%ld_flags_rpath_so" + postfix, ""))

libcxx/utils/libcxx/test/format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def _parseLitOutput(fullOutput):
6161
injecting additional Lit output around it.
6262
"""
6363
parsed = ''
64-
for output in re.split('[$]\s*":"\s*"RUN: at line \d+"', fullOutput):
64+
for output in re.split(r'[$]\s*":"\s*"RUN: at line \d+"', fullOutput):
6565
if output: # skip blank lines
6666
commandOutput = re.search("# command output:\n(.+)\n$", output, flags=re.DOTALL)
6767
if commandOutput:

libcxx/utils/libcxx/test/params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def getModuleFlag(cfg, enable_modules):
118118
),
119119
actions=lambda std: [
120120
AddFeature(std),
121-
AddSubstitution("%{cxx_std}", re.sub("\+", "x", std)),
121+
AddSubstitution("%{cxx_std}", re.sub(r"\+", "x", std)),
122122
AddCompileFlag(lambda cfg: getStdFlag(cfg, std)),
123123
],
124124
),
@@ -211,7 +211,7 @@ def getModuleFlag(cfg, enable_modules):
211211
AddFeature("stdlib={}".format(stdlib)),
212212
# Also add an umbrella feature 'stdlib=libc++' for all flavors of libc++, to simplify
213213
# the test suite.
214-
AddFeature("stdlib=libc++") if re.match(".+-libc\+\+", stdlib) else None,
214+
AddFeature("stdlib=libc++") if re.match(r".+-libc\+\+", stdlib) else None,
215215
],
216216
),
217217
),

llvm/test/lit.cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def ptxas_version(ptxas):
272272
ptxas_cmd = subprocess.Popen([ptxas, "--version"], stdout=subprocess.PIPE)
273273
ptxas_out = ptxas_cmd.stdout.read().decode("ascii")
274274
ptxas_cmd.wait()
275-
match = re.search("release (\d+)\.(\d+)", ptxas_out)
275+
match = re.search(r"release (\d+)\.(\d+)", ptxas_out)
276276
if match:
277277
return (int(match.group(1)), int(match.group(2)))
278278
print("couldn't determine ptxas version")

llvm/utils/lit/lit/TestRunner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def expand_glob_expressions(args, cwd):
202202

203203

204204
def quote_windows_command(seq):
205-
"""
205+
r"""
206206
Reimplement Python's private subprocess.list2cmdline for MSys compatibility
207207
208208
Based on CPython implementation here:
@@ -1548,7 +1548,7 @@ def tryParseIfCond(ln):
15481548
return cond, ln
15491549

15501550
def tryParseElse(ln):
1551-
match = _caching_re_compile("^\s*%else\s*(%{)?").search(ln)
1551+
match = _caching_re_compile(r"^\s*%else\s*(%{)?").search(ln)
15521552
if not match:
15531553
return False, ln
15541554
if not match.group(1):

0 commit comments

Comments
 (0)