[Incremental] Plumb -verify-incremental-dependencies Through The Frontend and Driver

When enabled at the driver level, the frontends will inherit the flag. For each frontend that recieves this option, all primaries will have their reference dependencies validated.
This commit is contained in:
Robert Widmann
2020-02-28 15:28:42 -08:00
parent 101dd2d9f7
commit d3edb5b15a
8 changed files with 45 additions and 1 deletions

View File

@@ -1480,6 +1480,12 @@ computeDeallocatableResources(const CompilerInvocation &Invocation,
return DeallocatableResources::SILModule;
}
// Verifying incremental dependencies relies on access to the Swift Module's
// source files. We can still free the SIL module, though.
if (Invocation.getFrontendOptions().VerifyDependencies) {
return DeallocatableResources::SILModule;
}
// If there are multiple primary inputs it is too soon to free
// the ASTContext, etc.. OTOH, if this compilation generates code for > 1
// primary input, then freeing it after processing the last primary is