Plumb Module Fingerprints Into ModuleDepGraphFactory

This commit is contained in:
Robert Widmann
2021-02-02 09:59:08 -08:00
parent 29904e7857
commit dab204e86e
3 changed files with 23 additions and 13 deletions

View File

@@ -499,19 +499,10 @@ void FrontendSourceFileDepGraphFactory::addAllUsedDecls() {
ModuleDepGraphFactory::ModuleDepGraphFactory(const ModuleDecl *Mod,
bool emitDot)
: AbstractSourceFileDepGraphFactory(Mod->getASTContext().hadError(),
Mod->getNameStr(), Fingerprint::ZERO(),
emitDot, Mod->getASTContext().Diags),
Mod(Mod) {
// Since a fingerprint only summarizes the state of the module but not
// the state of its fingerprinted sub-declarations, and since a module
// contains no state other than sub-declarations, its fingerprint does not
// matter and can just be some arbitrary value. Should it be the case that a
// change in a declaration that does not have a fingerprint must cause
// a rebuild of a file outside of the module, this assumption will need
// to be revisited.
}
: AbstractSourceFileDepGraphFactory(
Mod->getASTContext().hadError(), Mod->getNameStr(),
Mod->getFingerprint(), emitDot, Mod->getASTContext().Diags),
Mod(Mod) {}
void ModuleDepGraphFactory::addAllDefinedDecls() {
// TODO: express the multiple provides and depends streams with variadic