[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

@@ -249,10 +249,14 @@ public:
/// \param path A sequence of (identifier, location) pairs that denote
/// the dotted module name to load, e.g., AppKit.NSWindow.
///
/// \param AllowMemoryCache Enables preserving the loaded module in the
/// in-memory cache for the next loading attempt.
///
/// \returns the module referenced, if it could be loaded. Otherwise,
/// emits a diagnostic and returns NULL.
virtual
ModuleDecl *loadModule(SourceLoc importLoc, ImportPath::Module path) = 0;
ModuleDecl *loadModule(SourceLoc importLoc, ImportPath::Module path,
bool AllowMemoryCache = true) = 0;
/// Load extensions to the given nominal type.
///