[clangd] Unlink VFS working dir from OS working dir. Reland of r351051
authorSam McCall <sam.mccall@gmail.com>
Fri, 15 Feb 2019 11:04:25 +0000 (11:04 +0000)
committerSam McCall <sam.mccall@gmail.com>
Fri, 15 Feb 2019 11:04:25 +0000 (11:04 +0000)
llvm-svn: 354116

clang-tools-extra/clangd/FSProvider.cpp

index be91574..5d1434b 100644 (file)
@@ -74,9 +74,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