https://github.com/jansvoboda11 created 
https://github.com/llvm/llvm-project/pull/215964

The additional module maps stored in PCMs are just regular input files that are 
not expected to change during compilation. There's no reason to disable failure 
caching in the `FileManager` for them.

>From a12737daf8c65c1450490f77c26b0f8429434129 Mon Sep 17 00:00:00 2001
From: Jan Svoboda <[email protected]>
Date: Thu, 13 Aug 2026 08:27:56 +0200
Subject: [PATCH] [clang][modules] Cache failed stats of additional module maps

The additional module maps stored in PCMs are just regular input files that are 
not expected to change during compilation. There's no reason to disable failure 
caching in the `FileManager`.
---
 clang/lib/Serialization/ASTReader.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/Serialization/ASTReader.cpp 
b/clang/lib/Serialization/ASTReader.cpp
index 0cb44da23d855..bd01861a8c609 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -4794,7 +4794,7 @@ ASTReader::ReadModuleMapFileBlock(RecordData &Record, 
ModuleFile &F,
     for (unsigned I = 0, N = Record[Idx++]; I < N; ++I) {
       // FIXME: we should use input files rather than storing names.
       std::string Filename = ReadPath(F, Record, Idx);
-      auto SF = FileMgr.getOptionalFileRef(Filename, false, false);
+      auto SF = FileMgr.getOptionalFileRef(Filename);
       if (!SF) {
         if (!canRecoverFromOutOfDate(F.FileName, ClientLoadCapabilities))
           Error("could not find file '" + Filename +"' referenced by AST 
file");

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to