diff options
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
-rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp index 54dc60c3ed0..fefa12c7068 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp @@ -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; }(); |