[Lldb-commits] [lldb] r373998 - [lldb] Reverts part of 61f471a
Haibo Huang via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 7 17:33:26 PDT 2019
Author: hhb
Date: Mon Oct 7 17:33:26 2019
New Revision: 373998
URL: http://llvm.org/viewvc/llvm-project?rev=373998&view=rev
Log:
[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.
Modified:
lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp?rev=373998&r1=373997&r2=373998&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp (original)
+++ lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp Mon Oct 7 17:33:26 2019
@@ -319,6 +319,12 @@ void ScriptInterpreterPython::ComputePyt
// 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::GetPyt
#else
ComputePythonDir(path);
#endif
- llvm::sys::path::native(path);
spec.GetDirectory().SetString(path);
return spec;
}();
More information about the lldb-commits
mailing list