================
@@ -3349,9 +3351,14 @@ ASTReader::ReadControlBlock(ModuleFile &F,
                                       .getModuleCache()
                                       .getInMemoryModuleCache()
                                       .isPCMFinal(F.FileName);
-      if (isDiagnosedResult(Result, Capabilities) || recompilingFinalized)
+      if (isDiagnosedResult(Result, Capabilities) || recompilingFinalized) {
         Diag(diag::note_module_file_imported_by)
             << F.FileName << !F.ModuleName.empty() << F.ModuleName;
+        if (UseFilemap && !F.ModuleName.empty() && !StoredFile.empty() &&
+            StoredFile != ImportedFile)
----------------
cyndyishida wrote:

It's intentional, but I don't know that I understand why one is better than the 
other. What's the guideline or expectation here?

I think the note should still be reported if `StoredFile` doesn't exist. Are 
you thinking that creating a `FileEntry` would handle cases where different 
paths point to the same file?

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

Reply via email to