@@ -309,6 +309,10 @@ class ASTContext final {
309309 // / The name of the SwiftShims module "SwiftShims".
310310 Identifier SwiftShimsModuleName;
311311
312+ // / Should we globally ignore swiftmodule files adjacent to swiftinterface
313+ // / files?
314+ bool IgnoreAdjacentModules = false ;
315+
312316 // Define the set of known identifiers.
313317#define IDENTIFIER_WITH_NAME (Name, IdStr ) Identifier Id_##Name;
314318#include " swift/AST/KnownIdentifiers.def"
@@ -1144,9 +1148,12 @@ class ASTContext final {
11441148 // /
11451149 // / \param ModulePath The module's \c ImportPath which describes
11461150 // / the name of the module being loaded, possibly including submodules.
1147-
1151+ // / \param AllowMemoryCached Should we allow reuse of an already loaded
1152+ // / module or force reloading from disk, defaults to true.
1153+ // /
11481154 // / \returns The requested module, or NULL if the module cannot be found.
1149- ModuleDecl *getModule (ImportPath::Module ModulePath);
1155+ ModuleDecl *
1156+ getModule (ImportPath::Module ModulePath, bool AllowMemoryCached = true );
11501157
11511158 // / Attempts to load the matching overlay module for the given clang
11521159 // / module into this ASTContext.
@@ -1173,7 +1180,10 @@ class ASTContext final {
11731180 // / in this context.
11741181 void addLoadedModule (ModuleDecl *M);
11751182
1176- public:
1183+ // / Change the behavior of all loaders to ignore swiftmodules next to
1184+ // / swiftinterfaces.
1185+ void setIgnoreAdjacentModules (bool value);
1186+
11771187 // / Retrieve the current generation number, which reflects the
11781188 // / number of times a module import has caused mass invalidation of
11791189 // / lookup tables.
0 commit comments