mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Dependency Scanning] Disable Swift Parser ASTGen during dependency scan
On both input moduel source-files and interface files. This currently yields dramatic scanning performance improvements at no cost - we do not require an AST during scan.
This commit is contained in:
@@ -1369,6 +1369,12 @@ CompilerInstance::getSourceFileParsingOptions(bool forPrimary) const {
|
||||
opts |= SourceFile::ParsingFlags::SuppressWarnings;
|
||||
}
|
||||
|
||||
// Dependency scanning does not require an AST, so disable Swift Parser
|
||||
// ASTGen parsing completely.
|
||||
if (frontendOpts.RequestedAction ==
|
||||
FrontendOptions::ActionType::ScanDependencies)
|
||||
opts |= SourceFile::ParsingFlags::DisableSwiftParserASTGen;
|
||||
|
||||
// Enable interface hash computation for primaries or emit-module-separately,
|
||||
// but not in WMO, as it's only currently needed for incremental mode.
|
||||
if (forPrimary ||
|
||||
|
||||
Reference in New Issue
Block a user