For example:
llvm\tools\clang\test
was replaced by
llvm <tab> ools\clang <tab> est
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123070
91177308-0d34-0410-b5e6-
96231b3b80d8
# expression pattern a with substitution b in line ln.
def processLine(ln):
# Apply substitutions
- # FIXME: Investigate why re.sub doesn't work on Windows
for a,b in substitutions:
if kIsWindows:
- ln = ln.replace(a,b)
- else:
- ln = re.sub(a, b, ln)
+ b = b.replace("\\","\\\\")
+ ln = re.sub(a, b, ln)
# Strip the trailing newline and any extra whitespace.
return ln.strip()