Move PersistentParserState onto SourceFile

Move the global PersistentParserState from
the CompilerInstance to the source file that code
completion is operating on, only hooking up the
state when it's needed. This will help make it
easier to requestify source file parsing.
This commit is contained in:
Hamish Knight
2020-02-04 14:51:19 -08:00
parent 0d5a5e12d5
commit d77cae6720
14 changed files with 144 additions and 89 deletions

View File

@@ -42,8 +42,8 @@ static bool swiftConformingMethodListImpl(
ide::makeConformingMethodListCallbacksFactory(ExpectedTypeNames,
Consumer));
performCodeCompletionSecondPass(CI.getPersistentParserState(),
*callbacksFactory);
auto SF = CI.getCodeCompletionFile();
performCodeCompletionSecondPass(*SF.get(), *callbacksFactory);
});
}