summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2019-10-08 00:33:26 +0000
committerHaibo Huang <hhb@google.com>2019-10-08 00:33:26 +0000
commit0016b450bee87bec816f764acfb9fa6afc31c352 (patch)
tree7c970df557756855354b705013fac16d2d025099 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parent5d10e417e97bfe7581c72460c46f83722ece6693 (diff)
downloadbcm5719-llvm-0016b450bee87bec816f764acfb9fa6afc31c352.tar.gz
bcm5719-llvm-0016b450bee87bec816f764acfb9fa6afc31c352.zip
[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
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp7
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;
}();
OpenPOWER on IntegriCloud