@@ -69,6 +69,9 @@ class SwiftModuleDependenciesStorage : public ModuleDependenciesStorageBase {
6969 // / The Swift interface file, if it can be used to generate the module file.
7070 const Optional<std::string> swiftInterfaceFile;
7171
72+ // / Potentially ready-to-use compiled modules for the interface file.
73+ const std::vector<std::string> compiledModuleCandidates;
74+
7275 // / The Swift frontend invocation arguments to build the Swift module from the
7376 // / interface.
7477 const std::vector<std::string> buildCommandLine;
@@ -96,11 +99,14 @@ class SwiftModuleDependenciesStorage : public ModuleDependenciesStorageBase {
9699 SwiftModuleDependenciesStorage (
97100 const std::string &compiledModulePath,
98101 const Optional<std::string> &swiftInterfaceFile,
102+ ArrayRef<std::string> compiledModuleCandidates,
99103 ArrayRef<StringRef> buildCommandLine,
100104 ArrayRef<StringRef> extraPCMArgs,
101105 StringRef contextHash
102106 ) : ModuleDependenciesStorageBase(/* isSwiftModule=*/ true , compiledModulePath),
103107 swiftInterfaceFile (swiftInterfaceFile),
108+ compiledModuleCandidates(compiledModuleCandidates.begin(),
109+ compiledModuleCandidates.end()),
104110 buildCommandLine(buildCommandLine.begin(), buildCommandLine.end()),
105111 extraPCMArgs(extraPCMArgs.begin(), extraPCMArgs.end()),
106112 contextHash(contextHash) { }
@@ -181,13 +187,14 @@ class ModuleDependencies {
181187 // / built from a Swift interface file (\c .swiftinterface).
182188 static ModuleDependencies forSwiftInterface (
183189 const std::string &swiftInterfaceFile,
190+ ArrayRef<std::string> compiledCandidates,
184191 ArrayRef<StringRef> buildCommands,
185192 ArrayRef<StringRef> extraPCMArgs,
186193 StringRef contextHash) {
187194 std::string compiledModulePath;
188195 return ModuleDependencies (
189196 std::make_unique<SwiftModuleDependenciesStorage>(
190- compiledModulePath, swiftInterfaceFile, buildCommands,
197+ compiledModulePath, swiftInterfaceFile, compiledCandidates, buildCommands,
191198 extraPCMArgs, contextHash));
192199 }
193200
@@ -196,7 +203,7 @@ class ModuleDependencies {
196203 const std::string &compiledModulePath) {
197204 return ModuleDependencies (
198205 std::make_unique<SwiftModuleDependenciesStorage>(
199- compiledModulePath, None, ArrayRef<StringRef>(),
206+ compiledModulePath, None, ArrayRef<std::string>(), ArrayRef< StringRef>(),
200207 ArrayRef<StringRef>(), StringRef ()));
201208 }
202209
@@ -205,8 +212,8 @@ class ModuleDependencies {
205212 std::string compiledModulePath;
206213 return ModuleDependencies (
207214 std::make_unique<SwiftModuleDependenciesStorage>(
208- compiledModulePath, None, ArrayRef<StringRef >(), extraPCMArgs ,
209- StringRef ()));
215+ compiledModulePath, None, ArrayRef<std::string >(),
216+ ArrayRef<StringRef>(), extraPCMArgs, StringRef ()));
210217 }
211218
212219 // / Describe the module dependencies for a Clang module that can be
0 commit comments