@@ -266,7 +266,7 @@ class SwiftInterfaceModuleDependenciesStorage
266
266
: public ModuleDependencyInfoStorageBase {
267
267
public:
268
268
// / Destination output path
269
- const std::string moduleOutputPath;
269
+ std::string moduleOutputPath;
270
270
271
271
// / The Swift interface file to be used to generate the module file.
272
272
const std::string swiftInterfaceFile;
@@ -275,7 +275,7 @@ class SwiftInterfaceModuleDependenciesStorage
275
275
const std::vector<std::string> compiledModuleCandidates;
276
276
277
277
// / The hash value that will be used for the generated module
278
- const std::string contextHash;
278
+ std::string contextHash;
279
279
280
280
// / A flag that indicates this dependency is a framework
281
281
const bool isFramework;
@@ -290,22 +290,20 @@ class SwiftInterfaceModuleDependenciesStorage
290
290
const std::string userModuleVersion;
291
291
292
292
SwiftInterfaceModuleDependenciesStorage (
293
- StringRef moduleOutputPath, StringRef swiftInterfaceFile,
293
+ StringRef swiftInterfaceFile,
294
294
ArrayRef<StringRef> compiledModuleCandidates,
295
295
ArrayRef<ScannerImportStatementInfo> moduleImports,
296
296
ArrayRef<ScannerImportStatementInfo> optionalModuleImports,
297
297
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)
301
300
: ModuleDependencyInfoStorageBase(ModuleDependencyKind::SwiftInterface,
302
301
moduleImports, optionalModuleImports,
303
302
linkLibraries, moduleCacheKey),
304
- moduleOutputPath (moduleOutputPath),
305
303
swiftInterfaceFile (swiftInterfaceFile),
306
304
compiledModuleCandidates(compiledModuleCandidates.begin(),
307
305
compiledModuleCandidates.end()),
308
- contextHash(contextHash), isFramework(isFramework), isStatic(isStatic),
306
+ isFramework(isFramework), isStatic(isStatic),
309
307
textualModuleDetails(buildCommandLine, RootID),
310
308
userModuleVersion(userModuleVersion) {}
311
309
@@ -593,21 +591,18 @@ class ModuleDependencyInfo {
593
591
// / Describe the module dependencies for a Swift module that can be
594
592
// / built from a Swift interface file (\c .swiftinterface).
595
593
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,
598
596
ArrayRef<ScannerImportStatementInfo> moduleImports,
599
597
ArrayRef<ScannerImportStatementInfo> optionalModuleImports,
600
- ArrayRef<LinkLibrary> linkLibraries,
601
- StringRef contextHash, bool isFramework, bool isStatic,
598
+ ArrayRef<LinkLibrary> linkLibraries, bool isFramework, bool isStatic,
602
599
StringRef CASFileSystemRootID, StringRef moduleCacheKey,
603
600
StringRef userModuleVersion) {
604
601
return ModuleDependencyInfo (
605
602
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));
611
606
}
612
607
613
608
// / Describe the module dependencies for a serialized or parsed Swift module.
@@ -1005,6 +1000,9 @@ class ModuleDependencyInfo {
1005
1000
// / Set the chained bridging header buffer.
1006
1001
void setChainedBridgingHeaderBuffer (StringRef path, StringRef buffer);
1007
1002
1003
+ // / Set the output path and the context hash.
1004
+ void setOutputPathAndHash (StringRef outputPath, StringRef hash);
1005
+
1008
1006
// / Collect a map from a secondary module name to a list of cross-import
1009
1007
// / overlays, when this current module serves as the primary module.
1010
1008
llvm::StringMap<llvm::SmallSetVector<Identifier, 4 >>
0 commit comments