diff options
author | Sam McCall <sam.mccall@gmail.com> | 2019-01-14 11:06:48 +0000 |
---|---|---|
committer | Sam McCall <sam.mccall@gmail.com> | 2019-01-14 11:06:48 +0000 |
commit | 2dccf135381a13b5c972981629ba79d6fa85ad2f (patch) | |
tree | e15a8fcc218db125fbb029b5aca0edd994407194 /clang-tools-extra | |
parent | c2b310aedf69f83c0b7252a969a6bda023c9de34 (diff) |
[clangd] Unlink VFS working dir from OS working dir.
A lot of our previous FS manipulation was thread-unsafe in practice with
the RealFS implementation.
This switches to a different RealFS mode where path-manipulation is used
to simulate multiple working dirs.
r351050 both added this mode and removed the cache. If we want to
move back to the old implementation we need to put the cache back.
llvm-svn: 351051
Diffstat (limited to 'clang-tools-extra')
-rw-r--r-- | clang-tools-extra/clangd/FSProvider.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang-tools-extra/clangd/FSProvider.cpp b/clang-tools-extra/clangd/FSProvider.cpp index 81a1adab6b97..620bd97310eb 100644 --- a/clang-tools-extra/clangd/FSProvider.cpp +++ b/clang-tools-extra/clangd/FSProvider.cpp @@ -75,9 +75,10 @@ clang::clangd::RealFileSystemProvider::getFileSystem() const { // FIXME: Try to use a similar approach in Sema instead of relying on // propagation of the 'isVolatile' flag through all layers. #ifdef _WIN32 - return new VolatileFileSystem(llvm::vfs::getRealFileSystem()); + return new VolatileFileSystem( + llvm::vfs::createPhysicalFileSystem().release()); #else - return llvm::vfs::getRealFileSystem(); + return llvm::vfs::createPhysicalFileSystem().release(); #endif } } // namespace clangd |