Revert "[NFC] Improve FileSpec internal APIs and usage in preparation for adding caching of resolved/absolute." and follow-ups

This reverts commit 9429b67b8e.

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 commit f959d815f4.

Revert "Fix buildbot breakage after https://reviews.llvm.org/D130309."
This reverts commit 0bbce7a4c2.

Revert "Cache the value for absolute path in FileSpec."
This reverts commit dabe877248.
This commit is contained in:
Nico Weber
2022-07-23 12:31:31 -04:00
parent cbfc223920
commit 1b4b12a340
54 changed files with 251 additions and 328 deletions

View File

@@ -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;