llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Jan Svoboda (jansvoboda11)

<details>
<summary>Changes</summary>

Explicit module files are a (binary) input to the compilation. Just like any 
other input file they are expected to not change during compilation. There's no 
reason to disable failure caching in the `FileManager` for them.

---
Full diff: https://github.com/llvm/llvm-project/pull/215968.diff


1 Files Affected:

- (modified) clang/lib/Serialization/ModuleManager.cpp (+2-2) 


``````````diff
diff --git a/clang/lib/Serialization/ModuleManager.cpp 
b/clang/lib/Serialization/ModuleManager.cpp
index 920cf07736407..cbb9de32f2b15 100644
--- a/clang/lib/Serialization/ModuleManager.cpp
+++ b/clang/lib/Serialization/ModuleManager.cpp
@@ -56,7 +56,7 @@ ModuleManager::makeKey(const ModuleFileName &Name) const {
       return ModuleFileKey(Buf);
   } else {
     if (auto ModuleFile = FileMgr.getOptionalFileRef(Name, /*OpenFile=*/true,
-                                                     /*CacheFailure=*/false,
+                                                     /*CacheFailure=*/true,
                                                      /*IsText=*/false))
       return ModuleFileKey(*ModuleFile);
   }
@@ -206,7 +206,7 @@ AddModuleResult ModuleManager::addModule(
           FileName == StringRef("-")
               ? FileMgr.getSTDIN()
               : FileMgr.getFileRef(FileName, /*OpenFile=*/true,
-                                   /*CacheFailure=*/false,
+                                   /*CacheFailure=*/true,
                                    /*IsText=*/false);
       if (!Entry)
         return Entry.takeError();

``````````

</details>


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

Reply via email to