mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Parse] [Sema] Ensure lazy immediate mode only enabled when requested
This commit is contained in:
@@ -1576,7 +1576,9 @@ CompilerInstance::getSourceFileParsingOptions(bool forPrimary) const {
|
|||||||
frontendOpts.ReuseFrontendForMultipleCompilations) {
|
frontendOpts.ReuseFrontendForMultipleCompilations) {
|
||||||
opts |= ParsingFlags::EnableInterfaceHash;
|
opts |= ParsingFlags::EnableInterfaceHash;
|
||||||
}
|
}
|
||||||
if (action == ActionType::Immediate) {
|
const auto &LangOpts = Invocation.getLangOptions();
|
||||||
|
if (action == ActionType::Immediate &&
|
||||||
|
LangOpts.hasFeature(Feature::LazyImmediate)) {
|
||||||
opts -= ParsingFlags::DisableDelayedBodies;
|
opts -= ParsingFlags::DisableDelayedBodies;
|
||||||
opts -= ParsingFlags::ValidateNewParserDiagnostics;
|
opts -= ParsingFlags::ValidateNewParserDiagnostics;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -306,7 +306,8 @@ TypeCheckSourceFileRequest::evaluate(Evaluator &eval, SourceFile *SF) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!Ctx.TypeCheckerOpts.DeferToRuntime) {
|
if (!Ctx.TypeCheckerOpts.DeferToRuntime ||
|
||||||
|
!Ctx.LangOpts.hasFeature(Feature::LazyImmediate)) {
|
||||||
typeCheckDelayedFunctions(*SF);
|
typeCheckDelayedFunctions(*SF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user