[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

@@ -32,9 +32,9 @@ static bool swiftConformingMethodListImpl(
ArrayRef<const char *> ExpectedTypeNames,
ide::ConformingMethodListConsumer &Consumer,
llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> FileSystem,
std::string &Error) {
bool EnableASTCaching, std::string &Error) {
return Lang.performCompletionLikeOperation(
UnresolvedInputFile, Offset, Args, FileSystem, Error,
UnresolvedInputFile, Offset, Args, FileSystem, EnableASTCaching, Error,
[&](CompilerInstance &CI) {
// Create a factory for code completion callbacks that will feed the
// Consumer.
@@ -176,7 +176,7 @@ void SwiftLangSupport::getConformingMethodList(
if (!swiftConformingMethodListImpl(*this, UnresolvedInputFile, Offset, Args,
ExpectedTypeNames, Consumer, fileSystem,
error)) {
/*EnableASTCaching=*/false, error)) {
SKConsumer.failed(error);
}
}