mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Absorb the TypeCheckerFlags into the Frontend
De-duplicate TypeCheckingFlags, TypeChecker's Options, and the TypeChecker-Oriented FrontendOptions into a dedicated TypeCheckerOptions type. This moves a bunch of configuration state out of the type checker and into the ASTContext where it belongs.
This commit is contained in:
@@ -912,27 +912,6 @@ void CompilerInstance::parseLibraryFile(
|
||||
performNameBinding(*NextInput);
|
||||
}
|
||||
|
||||
OptionSet<TypeCheckingFlags> CompilerInstance::computeTypeCheckingOptions() {
|
||||
OptionSet<TypeCheckingFlags> TypeCheckOptions;
|
||||
if (isWholeModuleCompilation()) {
|
||||
TypeCheckOptions |= TypeCheckingFlags::DelayWholeModuleChecking;
|
||||
}
|
||||
const auto &options = Invocation.getFrontendOptions();
|
||||
if (options.DebugTimeFunctionBodies) {
|
||||
TypeCheckOptions |= TypeCheckingFlags::DebugTimeFunctionBodies;
|
||||
}
|
||||
if (FrontendOptions::isActionImmediate(options.RequestedAction)) {
|
||||
TypeCheckOptions |= TypeCheckingFlags::ForImmediateMode;
|
||||
}
|
||||
if (options.DebugTimeExpressionTypeChecking) {
|
||||
TypeCheckOptions |= TypeCheckingFlags::DebugTimeExpressions;
|
||||
}
|
||||
if (options.SkipNonInlinableFunctionBodies) {
|
||||
TypeCheckOptions |= TypeCheckingFlags::SkipNonInlinableFunctionBodies;
|
||||
}
|
||||
return TypeCheckOptions;
|
||||
}
|
||||
|
||||
bool CompilerInstance::parsePartialModulesAndLibraryFiles(
|
||||
const ImplicitImports &implicitImports) {
|
||||
FrontendStatsTracer tracer(Context->Stats,
|
||||
|
||||
Reference in New Issue
Block a user