Merge pull request #75704 from swiftlang/version-number-hack

DependencyScanner: report user module version in dependency scanning results for binary Swift modules
This commit is contained in:
Xi Ge
2024-08-06 15:42:39 -07:00
committed by GitHub
13 changed files with 70 additions and 12 deletions

View File

@@ -515,12 +515,13 @@ SerializedModuleLoaderBase::scanModuleFile(Twine modulePath, bool isFramework,
std::string definingModulePath =
loadedModuleFile->resolveModuleDefiningFilePath(Ctx.SearchPathOpts.getSDKPath());
std::string userModuleVer = loadedModuleFile->getUserModuleVersion().getAsString();
// Map the set of dependencies over to the "module dependencies".
auto dependencies = ModuleDependencyInfo::forSwiftBinaryModule(
modulePath.str(), moduleDocPath, sourceInfoPath, moduleImports,
optionalModuleImports, linkLibraries, importedHeader,
definingModulePath, isFramework, loadedModuleFile->isStaticLibrary(),
/*module-cache-key*/ "");
/*module-cache-key*/ "", userModuleVer);
return std::move(dependencies);
}