[AutoDiff upstream] Add common SIL differentiation utilities.

This commit is contained in:
Dan Zheng
2020-04-05 19:17:17 -07:00
parent bb6d4ebd9f
commit 8081482b57
5 changed files with 326 additions and 1 deletions

View File

@@ -2232,6 +2232,11 @@ SourceFile::getCachedVisibleDecls() const {
return getCache().AllVisibleValues;
}
void SourceFile::addVisibleDecl(ValueDecl *decl) {
Decls->push_back(decl);
getCache().AllVisibleValues.push_back(decl);
}
static void performAutoImport(
SourceFile &SF,
SourceFile::ImplicitModuleImportKind implicitModuleImportKind) {