Revert "[NFC] Improve FileSpec internal APIs and usage in preparation for adding caching of resolved/absolute." and follow-ups
This reverts commit9429b67b8e. It broke the build on Windows, see comments on https://reviews.llvm.org/D130309 It also reverts these follow-ups: Revert "Fix buildbot breakage after https://reviews.llvm.org/D130309." This reverts commitf959d815f4. Revert "Fix buildbot breakage after https://reviews.llvm.org/D130309." This reverts commit0bbce7a4c2. Revert "Cache the value for absolute path in FileSpec." This reverts commitdabe877248.
This commit is contained in:
@@ -241,7 +241,7 @@ void ScriptInterpreterPython::ComputePythonDir(
|
||||
llvm::sys::path::append(path, LLDB_PYTHON_RELATIVE_LIBDIR);
|
||||
|
||||
#if defined(_WIN32)
|
||||
// This will be injected directly through FileSpec.SetDirectory(),
|
||||
// This will be injected directly through FileSpec.GetDirectory().SetString(),
|
||||
// so we need to normalize manually.
|
||||
std::replace(path.begin(), path.end(), '\\', '/');
|
||||
#endif
|
||||
@@ -260,7 +260,7 @@ FileSpec ScriptInterpreterPython::GetPythonDir() {
|
||||
#else
|
||||
ComputePythonDir(path);
|
||||
#endif
|
||||
spec.SetDirectory(path);
|
||||
spec.GetDirectory().SetString(path);
|
||||
return spec;
|
||||
}();
|
||||
return g_spec;
|
||||
|
||||
Reference in New Issue
Block a user