Never cache the result of a module file lookup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174744 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Serialization/GlobalModuleIndex.cpp b/lib/Serialization/GlobalModuleIndex.cpp
index 5b2ab91..7d34f85 100644
--- a/lib/Serialization/GlobalModuleIndex.cpp
+++ b/lib/Serialization/GlobalModuleIndex.cpp
@@ -203,7 +203,8 @@
Dependencies(Record.begin() + Idx, Record.begin() + Idx + NumDeps);
// Find the file. If we can't find it, ignore it.
- const FileEntry *File = FileMgr.getFile(FileName);
+ const FileEntry *File = FileMgr.getFile(FileName, /*openFile=*/false,
+ /*cacheFailure=*/false);
if (!File) {
AnyOutOfDate = true;
break;
@@ -635,7 +636,9 @@
Idx += Length;
// Find the imported module file.
- const FileEntry *DependsOnFile = FileMgr.getFile(ImportedFile);
+ const FileEntry *DependsOnFile
+ = FileMgr.getFile(ImportedFile, /*openFile=*/false,
+ /*cacheFailure=*/false);
if (!DependsOnFile)
return true;