mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
DependenciesScanner: report user module version for textual Swift interfaces
This commit is contained in:
@@ -255,14 +255,15 @@ bool ModuleDependenciesCacheDeserializer::readGraph(SwiftDependencyScanningServi
|
||||
extraPCMArgsArrayID, contextHashID, isFramework, isStatic, bridgingHeaderFileID,
|
||||
sourceFilesArrayID, bridgingSourceFilesArrayID,
|
||||
bridgingModuleDependenciesArrayID, overlayDependencyIDArrayID,
|
||||
CASFileSystemRootID, bridgingHeaderIncludeTreeID, moduleCacheKeyID;
|
||||
CASFileSystemRootID, bridgingHeaderIncludeTreeID, moduleCacheKeyID,
|
||||
userModuleVersionID;
|
||||
SwiftInterfaceModuleDetailsLayout::readRecord(
|
||||
Scratch, outputPathFileID, interfaceFileID,
|
||||
compiledModuleCandidatesArrayID, buildCommandLineArrayID,
|
||||
extraPCMArgsArrayID, contextHashID, isFramework, isStatic, bridgingHeaderFileID,
|
||||
sourceFilesArrayID, bridgingSourceFilesArrayID,
|
||||
bridgingModuleDependenciesArrayID, overlayDependencyIDArrayID,
|
||||
CASFileSystemRootID, bridgingHeaderIncludeTreeID, moduleCacheKeyID);
|
||||
CASFileSystemRootID, bridgingHeaderIncludeTreeID, moduleCacheKeyID, userModuleVersionID);
|
||||
|
||||
auto outputModulePath = getIdentifier(outputPathFileID);
|
||||
if (!outputModulePath)
|
||||
@@ -304,13 +305,17 @@ bool ModuleDependenciesCacheDeserializer::readGraph(SwiftDependencyScanningServi
|
||||
auto moduleCacheKey = getIdentifier(moduleCacheKeyID);
|
||||
if (!moduleCacheKeyID)
|
||||
llvm::report_fatal_error("Bad moduleCacheKey");
|
||||
auto userModuleVersion = getIdentifier(userModuleVersionID);
|
||||
if (!userModuleVersion)
|
||||
llvm::report_fatal_error("Bad userModuleVersion");
|
||||
|
||||
// TODO: LinkLibraries, MacroDependencies
|
||||
// Form the dependencies storage object
|
||||
auto moduleDep = ModuleDependencyInfo::forSwiftInterfaceModule(
|
||||
outputModulePath.value(), optionalSwiftInterfaceFile.value(),
|
||||
compiledCandidatesRefs, buildCommandRefs, {}, extraPCMRefs,
|
||||
*contextHash, isFramework, isStatic, *rootFileSystemID, *moduleCacheKey);
|
||||
*contextHash, isFramework, isStatic, *rootFileSystemID, *moduleCacheKey,
|
||||
*userModuleVersion);
|
||||
|
||||
// Add imports of this module
|
||||
for (const auto &moduleName : currentModuleImports)
|
||||
@@ -1007,7 +1012,8 @@ void ModuleDependenciesCacheSerializer::writeModuleInfo(
|
||||
getIdentifier(swiftTextDeps->textualModuleDetails.CASFileSystemRootID),
|
||||
getIdentifier(swiftTextDeps->textualModuleDetails
|
||||
.CASBridgingHeaderIncludeTreeRootID),
|
||||
getIdentifier(swiftTextDeps->moduleCacheKey));
|
||||
getIdentifier(swiftTextDeps->moduleCacheKey),
|
||||
getIdentifier(swiftTextDeps->userModuleVersion));
|
||||
break;
|
||||
}
|
||||
case swift::ModuleDependencyKind::SwiftSource: {
|
||||
|
||||
Reference in New Issue
Block a user