@@ -255,14 +255,15 @@ bool ModuleDependenciesCacheDeserializer::readGraph(SwiftDependencyScanningServi
255255 extraPCMArgsArrayID, contextHashID, isFramework, isStatic, bridgingHeaderFileID,
256256 sourceFilesArrayID, bridgingSourceFilesArrayID,
257257 bridgingModuleDependenciesArrayID, overlayDependencyIDArrayID,
258- CASFileSystemRootID, bridgingHeaderIncludeTreeID, moduleCacheKeyID;
258+ CASFileSystemRootID, bridgingHeaderIncludeTreeID, moduleCacheKeyID,
259+ userModuleVersionID;
259260 SwiftInterfaceModuleDetailsLayout::readRecord (
260261 Scratch, outputPathFileID, interfaceFileID,
261262 compiledModuleCandidatesArrayID, buildCommandLineArrayID,
262263 extraPCMArgsArrayID, contextHashID, isFramework, isStatic, bridgingHeaderFileID,
263264 sourceFilesArrayID, bridgingSourceFilesArrayID,
264265 bridgingModuleDependenciesArrayID, overlayDependencyIDArrayID,
265- CASFileSystemRootID, bridgingHeaderIncludeTreeID, moduleCacheKeyID);
266+ CASFileSystemRootID, bridgingHeaderIncludeTreeID, moduleCacheKeyID, userModuleVersionID );
266267
267268 auto outputModulePath = getIdentifier (outputPathFileID);
268269 if (!outputModulePath)
@@ -304,13 +305,17 @@ bool ModuleDependenciesCacheDeserializer::readGraph(SwiftDependencyScanningServi
304305 auto moduleCacheKey = getIdentifier (moduleCacheKeyID);
305306 if (!moduleCacheKeyID)
306307 llvm::report_fatal_error (" Bad moduleCacheKey" );
308+ auto userModuleVersion = getIdentifier (userModuleVersionID);
309+ if (!userModuleVersion)
310+ llvm::report_fatal_error (" Bad userModuleVersion" );
307311
308312 // TODO: LinkLibraries, MacroDependencies
309313 // Form the dependencies storage object
310314 auto moduleDep = ModuleDependencyInfo::forSwiftInterfaceModule (
311315 outputModulePath.value (), optionalSwiftInterfaceFile.value (),
312316 compiledCandidatesRefs, buildCommandRefs, {}, extraPCMRefs,
313- *contextHash, isFramework, isStatic, *rootFileSystemID, *moduleCacheKey);
317+ *contextHash, isFramework, isStatic, *rootFileSystemID, *moduleCacheKey,
318+ *userModuleVersion);
314319
315320 // Add imports of this module
316321 for (const auto &moduleName : currentModuleImports)
@@ -1007,7 +1012,8 @@ void ModuleDependenciesCacheSerializer::writeModuleInfo(
10071012 getIdentifier (swiftTextDeps->textualModuleDetails .CASFileSystemRootID ),
10081013 getIdentifier (swiftTextDeps->textualModuleDetails
10091014 .CASBridgingHeaderIncludeTreeRootID ),
1010- getIdentifier (swiftTextDeps->moduleCacheKey ));
1015+ getIdentifier (swiftTextDeps->moduleCacheKey ),
1016+ getIdentifier (swiftTextDeps->userModuleVersion ));
10111017 break ;
10121018 }
10131019 case swift::ModuleDependencyKind::SwiftSource: {
0 commit comments