diff --git a/llvm/utils/lit/lit/util.py b/llvm/utils/lit/lit/util.py --- a/llvm/utils/lit/lit/util.py +++ b/llvm/utils/lit/lit/util.py @@ -151,6 +151,10 @@ from ctypes import GetLastError, WinError path = os.path.abspath(path) + # Make sure that the path uses backslashes here, in case + # python would have happened to use forward slashes, as the + # NT path format only supports backslashes. + path = path.replace('/', '\\') NTPath = to_unicode(r'\\?\%s' % path) if not windll.kernel32.CreateDirectoryW(NTPath, None): raise WinError(GetLastError())