[lldb] Reverts part of 61f471a

Seems I wrongly merged an old patch.

Reverts the change related to python dir for windows.

FileSpec should always contain normalized path. I.e. using '/' even in
windows.

llvm-svn: 373998
This commit is contained in:
Haibo Huang
2019-10-08 00:33:26 +00:00
parent 5d10e417e9
commit 0016b450be

View File

@@ -319,6 +319,12 @@ void ScriptInterpreterPython::ComputePythonDir(
// x86_64, or bin on Windows).
llvm::sys::path::remove_filename(path);
llvm::sys::path::append(path, LLDB_PYTHON_RELATIVE_LIBDIR);
#if defined(_WIN32)
// This will be injected directly through FileSpec.GetDirectory().SetString(),
// so we need to normalize manually.
std::replace(path.begin(), path.end(), '\\', '/');
#endif
}
FileSpec ScriptInterpreterPython::GetPythonDir() {
@@ -334,7 +340,6 @@ FileSpec ScriptInterpreterPython::GetPythonDir() {
#else
ComputePythonDir(path);
#endif
llvm::sys::path::native(path);
spec.GetDirectory().SetString(path);
return spec;
}();