[Serialization] Add control over adding a loaded module to the in-memory cache

This commit is contained in:
Alexis Laferrière
2022-10-26 16:05:09 -07:00
parent 3b63f4986a
commit 730497e9a3
8 changed files with 30 additions and 12 deletions

View File

@@ -185,7 +185,8 @@ public:
/// emits a diagnostic and returns a FailedImportModule object.
virtual ModuleDecl *
loadModule(SourceLoc importLoc,
ImportPath::Module path) override;
ImportPath::Module path,
bool AllowMemoryCache) override;
virtual void loadExtensions(NominalTypeDecl *nominal,
@@ -294,7 +295,8 @@ public:
ModuleDecl *
loadModule(SourceLoc importLoc,
ImportPath::Module path) override;
ImportPath::Module path,
bool AllowMemoryCache = true) override;
/// Register a memory buffer that contains the serialized module for the given
/// access path. This API is intended to be used by LLDB to add swiftmodules