Remove unused TypeCheckers

This commit is contained in:
Robert Widmann
2019-11-10 17:11:13 -08:00
parent b8dc4f0a3f
commit 8ff60abf6f
10 changed files with 22 additions and 28 deletions

View File

@@ -852,12 +852,12 @@ void CompilerInstance::parseAndCheckTypesUpTo(
}) && "some files have not yet had their imports resolved");
MainModule->setHasResolvedImports();
// If the limiting AST stage is name binding, we're done.
if (limitStage <= SourceFile::NameBound) {
return;
}
forEachFileToTypeCheck([&](SourceFile &SF) {
if (limitStage == SourceFile::NameBound) {
bindExtensions(SF);
return;
}
performTypeChecking(SF, PersistentState->getTopLevelContext());
if (!Context->hadError() && Invocation.getFrontendOptions().PCMacro) {
@@ -874,9 +874,16 @@ void CompilerInstance::parseAndCheckTypesUpTo(
});
if (Invocation.isCodeCompletion()) {
assert(limitStage == SourceFile::NameBound);
performCodeCompletionSecondPass(*PersistentState.get(),
*Invocation.getCodeCompletionFactory());
}
// If the limiting AST stage is name binding, we're done.
if (limitStage <= SourceFile::NameBound) {
return;
}
finishTypeChecking();
}