[clang-tools-extra] r351051 - [clangd] Unlink VFS working dir from OS working dir.
Sam McCall via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 14 03:06:49 PST 2019
Author: sammccall
Date: Mon Jan 14 03:06:48 2019
New Revision: 351051
URL: http://llvm.org/viewvc/llvm-project?rev=351051&view=rev
Log:
[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.
Modified:
clang-tools-extra/trunk/clangd/FSProvider.cpp
Modified: clang-tools-extra/trunk/clangd/FSProvider.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/FSProvider.cpp?rev=351051&r1=351050&r2=351051&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/FSProvider.cpp (original)
+++ clang-tools-extra/trunk/clangd/FSProvider.cpp Mon Jan 14 03:06:48 2019
@@ -75,9 +75,10 @@ clang::clangd::RealFileSystemProvider::g
// 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
More information about the cfe-commits
mailing list