DependenciesScanner: report user module version for textual Swift interfaces

This commit is contained in:
Xi Ge
2024-08-06 14:48:53 -07:00
parent 370bcec229
commit 98f4ad840a
14 changed files with 60 additions and 16 deletions

View File

@@ -154,7 +154,7 @@ SwiftModuleScanner::scanInterfaceFile(Twine moduleInterfacePath,
realModuleName.str(), moduleInterfacePath.str(), sdkPath,
StringRef(), SourceLoc(),
[&](ASTContext &Ctx, ModuleDecl *mainMod, ArrayRef<StringRef> BaseArgs,
ArrayRef<StringRef> PCMArgs, StringRef Hash) {
ArrayRef<StringRef> PCMArgs, StringRef Hash, StringRef UserModVer) {
assert(mainMod);
std::string InPath = moduleInterfacePath.str();
auto compiledCandidates =
@@ -247,7 +247,7 @@ SwiftModuleScanner::scanInterfaceFile(Twine moduleInterfacePath,
Result = ModuleDependencyInfo::forSwiftInterfaceModule(
outputPathBase.str().str(), InPath, compiledCandidatesRefs,
ArgsRefs, linkLibraries, PCMArgs, Hash, isFramework, isStatic, {},
/*module-cache-key*/ "");
/*module-cache-key*/ "", UserModVer);
if (Ctx.CASOpts.EnableCaching) {
std::vector<std::string> clangDependencyFiles;