@@ -309,6 +309,10 @@ class ASTContext final {
309
309
// / The name of the SwiftShims module "SwiftShims".
310
310
Identifier SwiftShimsModuleName;
311
311
312
+ // / Should we globally ignore swiftmodule files adjacent to swiftinterface
313
+ // / files?
314
+ bool IgnoreAdjacentModules = false ;
315
+
312
316
// Define the set of known identifiers.
313
317
#define IDENTIFIER_WITH_NAME (Name, IdStr ) Identifier Id_##Name;
314
318
#include " swift/AST/KnownIdentifiers.def"
@@ -1144,9 +1148,12 @@ class ASTContext final {
1144
1148
// /
1145
1149
// / \param ModulePath The module's \c ImportPath which describes
1146
1150
// / 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
+ // /
1148
1154
// / \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 );
1150
1157
1151
1158
// / Attempts to load the matching overlay module for the given clang
1152
1159
// / module into this ASTContext.
@@ -1173,7 +1180,10 @@ class ASTContext final {
1173
1180
// / in this context.
1174
1181
void addLoadedModule (ModuleDecl *M);
1175
1182
1176
- public:
1183
+ // / Change the behavior of all loaders to ignore swiftmodules next to
1184
+ // / swiftinterfaces.
1185
+ void setIgnoreAdjacentModules (bool value);
1186
+
1177
1187
// / Retrieve the current generation number, which reflects the
1178
1188
// / number of times a module import has caused mass invalidation of
1179
1189
// / lookup tables.
0 commit comments