Frontend: Introduce -experimental-lazy-typecheck action.

This action is currently just an alias of the `-resolve-imports` action.
However, it's named to more clearly reflect the purpose which is to do the
minimal typechecking needed in order to emit the requested outputs. This mode
is intended to improve performance when emitting `.swiftinterface` and `.tbd`
files.
This commit is contained in:
Allan Shortlidge
2023-08-18 15:49:53 -07:00
parent 0c957a2090
commit 54435aca4f
6 changed files with 29 additions and 0 deletions

View File

@@ -1359,6 +1359,9 @@ static bool performAction(CompilerInstance &Instance,
return performParseOnly(*Instance.getMainModule());
case FrontendOptions::ActionType::ResolveImports:
return Instance.performParseAndResolveImportsOnly();
case FrontendOptions::ActionType::LazyTypecheck:
// For now, this action is just an alias of ResolveImports.
return Instance.performParseAndResolveImportsOnly();
case FrontendOptions::ActionType::Typecheck:
return withSemanticAnalysis(Instance, observer,
[](CompilerInstance &Instance) {