@@ -115,15 +115,6 @@ struct ModuleID {
115115 }
116116};
117117
118- struct ExtendedModuleID {
119- ModuleID ID;
120- bool Exported;
121-
122- bool operator <(const ExtendedModuleID &Other) const {
123- return std::tie (ID, Exported) < std::tie (Other.ID , Other.Exported );
124- }
125- };
126-
127118// / P1689ModuleInfo - Represents the needed information of standard C++20
128119// / modules for P1689 format.
129120struct P1689ModuleInfo {
@@ -187,12 +178,25 @@ struct ModuleDeps {
187178 // / on, not including transitive dependencies.
188179 std::vector<PrebuiltModuleDep> PrebuiltModuleDeps;
189180
190- // / A list of module identifiers this module directly depends on, not
191- // / including transitive dependencies.
181+ // / This struct contains information about a single dependency.
182+ struct DepsInfo {
183+ // / Identifies the dependency.
184+ ModuleID ID;
185+
186+ // / Indicates if the module that has this dependency exports it or not.
187+ bool Exported = false ;
188+
189+ bool operator <(const DepsInfo &Other) const {
190+ return std::tie (ID, Exported) < std::tie (Other.ID , Other.Exported );
191+ }
192+ };
193+
194+ // / A list of DepsInfo containing information about modules this module
195+ // / directly depends on, not including transitive dependencies.
192196 // /
193197 // / This may include modules with a different context hash when it can be
194198 // / determined that the differences are benign for this compilation.
195- std::vector<ExtendedModuleID > ClangModuleDeps;
199+ std::vector<ModuleDeps::DepsInfo > ClangModuleDeps;
196200
197201 // / The set of libraries or frameworks to link against when
198202 // / an entity from this module is used.
@@ -362,16 +366,16 @@ class ModuleDepCollector final : public DependencyCollector {
362366
363367 // / Collect module map files for given modules.
364368 llvm::DenseSet<const FileEntry *>
365- collectModuleMapFiles (ArrayRef<ExtendedModuleID > ClangModuleDeps) const ;
369+ collectModuleMapFiles (ArrayRef<ModuleDeps::DepsInfo > ClangModuleDeps) const ;
366370
367371 // / Add module map files to the invocation, if needed.
368372 void addModuleMapFiles (CompilerInvocation &CI,
369- ArrayRef<ExtendedModuleID > ClangModuleDeps) const ;
373+ ArrayRef<ModuleDeps::DepsInfo > ClangModuleDeps) const ;
370374 // / Add module files (pcm) to the invocation, if needed.
371375 void addModuleFiles (CompilerInvocation &CI,
372- ArrayRef<ExtendedModuleID > ClangModuleDeps) const ;
376+ ArrayRef<ModuleDeps::DepsInfo > ClangModuleDeps) const ;
373377 void addModuleFiles (CowCompilerInvocation &CI,
374- ArrayRef<ExtendedModuleID > ClangModuleDeps) const ;
378+ ArrayRef<ModuleDeps::DepsInfo > ClangModuleDeps) const ;
375379
376380 // / Add paths that require looking up outputs to the given dependencies.
377381 void addOutputPaths (CowCompilerInvocation &CI, ModuleDeps &Deps);
0 commit comments