Move storage for VFS into editor document

The invocation options are not an appropriate place to put this state,
since it can change between requests. This moves it to the editor
document, allowing us to change the specific VFS instance without
causing a rebuild (unless the contents/timestamps for a dependency
change).
This commit is contained in:
Ben Langmuir
2019-06-25 14:27:56 -07:00
committed by Marc Rasi
parent 78a7d95f07
commit 205371c886
9 changed files with 205 additions and 132 deletions

View File

@@ -775,7 +775,8 @@ void SwiftLangSupport::editorOpenSwiftSourceInterface(StringRef Name,
auto AstConsumer = std::make_shared<PrimaryFileInterfaceConsumer>(Name,
SourceName, IFaceGenContexts, Consumer, Invocation);
static const char OncePerASTToken = 0;
getASTManager()->processASTAsync(Invocation, AstConsumer, &OncePerASTToken);
getASTManager()->processASTAsync(Invocation, AstConsumer, &OncePerASTToken,
llvm::vfs::getRealFileSystem());
}
void SwiftLangSupport::editorOpenHeaderInterface(EditorConsumer &Consumer,