@@ -178,25 +178,12 @@ struct ModuleDeps {
178178 // / on, not including transitive dependencies.
179179 std::vector<PrebuiltModuleDep> PrebuiltModuleDeps;
180180
181- // / This struct contains information about a single dependency.
182- struct DepInfo {
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 DepInfo &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.
181+ // / A list of module identifiers this module directly depends on, not
182+ // / including transitive dependencies.
196183 // /
197184 // / This may include modules with a different context hash when it can be
198185 // / determined that the differences are benign for this compilation.
199- std::vector<ModuleDeps::DepInfo > ClangModuleDeps;
186+ std::vector<ModuleID > ClangModuleDeps;
200187
201188 // / The set of libraries or frameworks to link against when
202189 // / an entity from this module is used.
@@ -283,8 +270,7 @@ class ModuleDepCollectorPP final : public PPCallbacks {
283270 llvm::DenseSet<const Module *> &AddedModules);
284271
285272 // / Add discovered module dependency for the given module.
286- void addOneModuleDep (const Module *M, bool Exported, const ModuleID ID,
287- ModuleDeps &MD);
273+ void addOneModuleDep (const Module *M, const ModuleID ID, ModuleDeps &MD);
288274};
289275
290276// / Collects modular and non-modular dependencies of the main file by attaching
@@ -325,8 +311,6 @@ class ModuleDepCollector final : public DependencyCollector {
325311 const ArrayRef<StringRef> StableDirs;
326312 // / Path to the main source file.
327313 std::string MainFile;
328- // / Hash identifying the compilation conditions of the current TU.
329- std::string ContextHash;
330314 // / Non-modular file dependencies. This includes the main source file and
331315 // / textually included header files.
332316 std::vector<std::string> FileDeps;
@@ -366,16 +350,16 @@ class ModuleDepCollector final : public DependencyCollector {
366350
367351 // / Collect module map files for given modules.
368352 llvm::DenseSet<const FileEntry *>
369- collectModuleMapFiles (ArrayRef<ModuleDeps::DepInfo > ClangModuleDeps) const ;
353+ collectModuleMapFiles (ArrayRef<ModuleID > ClangModuleDeps) const ;
370354
371355 // / Add module map files to the invocation, if needed.
372356 void addModuleMapFiles (CompilerInvocation &CI,
373- ArrayRef<ModuleDeps::DepInfo > ClangModuleDeps) const ;
357+ ArrayRef<ModuleID > ClangModuleDeps) const ;
374358 // / Add module files (pcm) to the invocation, if needed.
375359 void addModuleFiles (CompilerInvocation &CI,
376- ArrayRef<ModuleDeps::DepInfo > ClangModuleDeps) const ;
360+ ArrayRef<ModuleID > ClangModuleDeps) const ;
377361 void addModuleFiles (CowCompilerInvocation &CI,
378- ArrayRef<ModuleDeps::DepInfo > ClangModuleDeps) const ;
362+ ArrayRef<ModuleID > ClangModuleDeps) const ;
379363
380364 // / Add paths that require looking up outputs to the given dependencies.
381365 void addOutputPaths (CowCompilerInvocation &CI, ModuleDeps &Deps);
0 commit comments