AST: Introduce a new ImportCache singleton

This commit is contained in:
Slava Pestov
2019-08-26 17:01:19 -04:00
parent b3d95d7968
commit acf5371dfc
7 changed files with 503 additions and 1 deletions

View File

@@ -24,6 +24,7 @@
#include "swift/AST/DiagnosticsSema.h"
#include "swift/AST/ExistentialLayout.h"
#include "swift/AST/GenericEnvironment.h"
#include "swift/AST/ImportCache.h"
#include "swift/AST/LazyResolver.h"
#include "swift/AST/LinkLibrary.h"
#include "swift/AST/ModuleLoader.h"
@@ -1642,6 +1643,8 @@ bool SourceFile::isImportedImplementationOnly(const ModuleDecl *module) const {
}
void ModuleDecl::clearLookupCache() {
getASTContext().getImportCache().clear();
if (!Cache)
return;