Use volatile filesystem (Windows)

This commit is contained in:
Crunkle 2019-07-31 02:31:12 +01:00
parent af72b59d88
commit e9bfd22533

View File

@ -1264,6 +1264,12 @@ Index(SemaManager *manager, WorkingFiles *wfiles, VFS *vfs,
Clang->createFileManager();
#endif
#ifdef _WIN32
// Always set UserFilesAreVolatile true to avoid write locks on Windows
Clang->setSourceManager(new SourceManager(Clang->getDiagnostics(),
Clang->getFileManager(), true));
#endif
IndexParam param(*vfs, no_linkage);
auto DataConsumer = std::make_shared<IndexDataConsumer>(param);