[SourceKit] Pass 'EnableASTCaching' flag as an argument

so that it is associated with a specific completion.
This commit is contained in:
Rintaro Ishizaki
2019-12-19 12:16:24 -08:00
parent 2aec5d4d28
commit eebcbf6564
8 changed files with 65 additions and 65 deletions

View File

@@ -957,7 +957,8 @@ bool SwiftLangSupport::performCompletionLikeOperation(
llvm::MemoryBuffer *UnresolvedInputFile, unsigned Offset,
ArrayRef<const char *> Args,
llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> FileSystem,
std::string &Error, llvm::function_ref<void(CompilerInstance &)> Callback) {
bool EnableASTCaching, std::string &Error,
llvm::function_ref<void(CompilerInstance &)> Callback) {
assert(FileSystem);
// Resolve symlinks for the input file; we resolve them for the input files
@@ -1011,7 +1012,8 @@ bool SwiftLangSupport::performCompletionLikeOperation(
auto CompletionInst = getCompletionInstance();
return CompletionInst->performOperation(Invocation, Args, FileSystem,
newBuffer.get(), Offset, Error,
newBuffer.get(), Offset,
EnableASTCaching, Error,
&CIDiags, Callback);
}