================
@@ -184,14 +184,30 @@ GetAffectingModuleMaps(const Preprocessor &PP, Module 
*RootModule) {
   const SourceManager &SM = PP.getSourceManager();
   const ModuleMap &MM = HS.getModuleMap();
 
-  llvm::DenseSet<FileID> ModuleMaps;
-
-  llvm::DenseSet<const Module *> ProcessedModules;
-  auto CollectModuleMapsForHierarchy = [&](const Module *M) {
+  // Module maps used only by textual headers are special. Their FileID is
+  // non-affecting, but their FileEntry is (i.e. must be written as InputFile).
+  enum AffectedReason : bool {
+    ARTextualHeader = 0,
+    ARImportOrTextualHeader = 1,
----------------
bricknerb wrote:

I think you should use underscore (`AR_`).
https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly
```suggestion
    AR_TextualHeader = 0,
    AR_ImportOrTextualHeader = 1,
```

https://github.com/llvm/llvm-project/pull/116374
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to