@@ -266,7 +266,7 @@ class SwiftInterfaceModuleDependenciesStorage
266266 : public ModuleDependencyInfoStorageBase {
267267public:
268268 // / Destination output path
269- const std::string moduleOutputPath;
269+ std::string moduleOutputPath;
270270
271271 // / The Swift interface file to be used to generate the module file.
272272 const std::string swiftInterfaceFile;
@@ -275,7 +275,7 @@ class SwiftInterfaceModuleDependenciesStorage
275275 const std::vector<std::string> compiledModuleCandidates;
276276
277277 // / The hash value that will be used for the generated module
278- const std::string contextHash;
278+ std::string contextHash;
279279
280280 // / A flag that indicates this dependency is a framework
281281 const bool isFramework;
@@ -290,22 +290,20 @@ class SwiftInterfaceModuleDependenciesStorage
290290 const std::string userModuleVersion;
291291
292292 SwiftInterfaceModuleDependenciesStorage (
293- StringRef moduleOutputPath, StringRef swiftInterfaceFile,
293+ StringRef swiftInterfaceFile,
294294 ArrayRef<StringRef> compiledModuleCandidates,
295295 ArrayRef<ScannerImportStatementInfo> moduleImports,
296296 ArrayRef<ScannerImportStatementInfo> optionalModuleImports,
297297 ArrayRef<StringRef> buildCommandLine, ArrayRef<LinkLibrary> linkLibraries,
298- StringRef contextHash, bool isFramework,
299- bool isStatic, StringRef RootID, StringRef moduleCacheKey,
300- StringRef userModuleVersion)
298+ bool isFramework, bool isStatic, StringRef RootID,
299+ StringRef moduleCacheKey, StringRef userModuleVersion)
301300 : ModuleDependencyInfoStorageBase(ModuleDependencyKind::SwiftInterface,
302301 moduleImports, optionalModuleImports,
303302 linkLibraries, moduleCacheKey),
304- moduleOutputPath (moduleOutputPath),
305303 swiftInterfaceFile (swiftInterfaceFile),
306304 compiledModuleCandidates(compiledModuleCandidates.begin(),
307305 compiledModuleCandidates.end()),
308- contextHash(contextHash), isFramework(isFramework), isStatic(isStatic),
306+ isFramework(isFramework), isStatic(isStatic),
309307 textualModuleDetails(buildCommandLine, RootID),
310308 userModuleVersion(userModuleVersion) {}
311309
@@ -593,21 +591,18 @@ class ModuleDependencyInfo {
593591 // / Describe the module dependencies for a Swift module that can be
594592 // / built from a Swift interface file (\c .swiftinterface).
595593 static ModuleDependencyInfo forSwiftInterfaceModule (
596- StringRef moduleOutputPath, StringRef swiftInterfaceFile ,
597- ArrayRef<StringRef> compiledCandidates, ArrayRef<StringRef> buildCommands,
594+ StringRef swiftInterfaceFile, ArrayRef< StringRef> compiledCandidates ,
595+ ArrayRef<StringRef> buildCommands,
598596 ArrayRef<ScannerImportStatementInfo> moduleImports,
599597 ArrayRef<ScannerImportStatementInfo> optionalModuleImports,
600- ArrayRef<LinkLibrary> linkLibraries,
601- StringRef contextHash, bool isFramework, bool isStatic,
598+ ArrayRef<LinkLibrary> linkLibraries, bool isFramework, bool isStatic,
602599 StringRef CASFileSystemRootID, StringRef moduleCacheKey,
603600 StringRef userModuleVersion) {
604601 return ModuleDependencyInfo (
605602 std::make_unique<SwiftInterfaceModuleDependenciesStorage>(
606- moduleOutputPath, swiftInterfaceFile, compiledCandidates,
607- moduleImports, optionalModuleImports,
608- buildCommands, linkLibraries, contextHash,
609- isFramework, isStatic, CASFileSystemRootID, moduleCacheKey,
610- userModuleVersion));
603+ swiftInterfaceFile, compiledCandidates, moduleImports,
604+ optionalModuleImports, buildCommands, linkLibraries, isFramework,
605+ isStatic, CASFileSystemRootID, moduleCacheKey, userModuleVersion));
611606 }
612607
613608 // / Describe the module dependencies for a serialized or parsed Swift module.
@@ -1005,6 +1000,9 @@ class ModuleDependencyInfo {
10051000 // / Set the chained bridging header buffer.
10061001 void setChainedBridgingHeaderBuffer (StringRef path, StringRef buffer);
10071002
1003+ // / Set the output path and the context hash.
1004+ void setOutputPathAndHash (StringRef outputPath, StringRef hash);
1005+
10081006 // / Collect a map from a secondary module name to a list of cross-import
10091007 // / overlays, when this current module serves as the primary module.
10101008 llvm::StringMap<llvm::SmallSetVector<Identifier, 4 >>
0 commit comments