DependencyScanner: report user module version in dependency scanning results for binary Swift modules

This commit is contained in:
Xi Ge
2024-08-05 11:38:36 -07:00
parent 661f368c6b
commit b4d64bde55
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);
}