We were using old stat values for any files that had previously been
looked up, leading to badness. There might be a more elegant solution in
invalidating the cache for those file (since we already know which ones
they are), but it seems too likely there are existing references to
them hiding somewhere.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211504
91177308-0d34-0410-b5e6-
96231b3b80d8
// Configure the various subsystems.
LangOpts = &Clang->getLangOpts();
FileSystemOpts = Clang->getFileSystemOpts();
- // Re-use the existing FileManager
+ IntrusiveRefCntPtr<vfs::FileSystem> VFS =
+ createVFSFromCompilerInvocation(Clang->getInvocation(), getDiagnostics());
+ if (!VFS) {
+ delete OverrideMainBuffer;
+ return true;
+ }
+ FileMgr = new FileManager(FileSystemOpts, VFS);
SourceMgr = new SourceManager(getDiagnostics(), *FileMgr,
UserFilesAreVolatile);
TheSema.reset();