Skip to content

Commit 791cdea

Browse files
author
Zak Kent
committed
[Immediate] Lazy Parsing
Implement lazy parsing, allowing functions to be parsed only when they are executed.
1 parent 148cd6a commit 791cdea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Frontend/Frontend.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,6 +1576,10 @@ CompilerInstance::getSourceFileParsingOptions(bool forPrimary) const {
15761576
frontendOpts.ReuseFrontendForMultipleCompilations) {
15771577
opts |= ParsingFlags::EnableInterfaceHash;
15781578
}
1579+
if (action == ActionType::Immediate) {
1580+
opts -= ParsingFlags::DisableDelayedBodies;
1581+
opts -= ParsingFlags::ValidateNewParserDiagnostics;
1582+
}
15791583
return opts;
15801584
}
15811585

0 commit comments

Comments
 (0)