From dadd85dc0c84e183f6c2fc1af86a5c77c3feb3db Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 8 Feb 2013 21:27:45 +0000 Subject: Never cache the result of a module file lookup. llvm-svn: 174744 --- clang/lib/Serialization/GlobalModuleIndex.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'clang/lib/Serialization/GlobalModuleIndex.cpp') diff --git a/clang/lib/Serialization/GlobalModuleIndex.cpp b/clang/lib/Serialization/GlobalModuleIndex.cpp index 5b2ab913fa0..7d34f85fd8b 100644 --- a/clang/lib/Serialization/GlobalModuleIndex.cpp +++ b/clang/lib/Serialization/GlobalModuleIndex.cpp @@ -203,7 +203,8 @@ GlobalModuleIndex::GlobalModuleIndex(FileManager &FileMgr, 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 @@ bool GlobalModuleIndexBuilder::loadModuleFile(const FileEntry *File) { 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; -- cgit v1.2.3