aboutsummaryrefslogtreecommitdiff
path: root/lib/Serialization
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Serialization')
-rw-r--r--lib/Serialization/GlobalModuleIndex.cpp7
-rw-r--r--lib/Serialization/ModuleManager.cpp9
2 files changed, 11 insertions, 5 deletions
diff --git a/lib/Serialization/GlobalModuleIndex.cpp b/lib/Serialization/GlobalModuleIndex.cpp
index 5b2ab913fa..7d34f85fd8 100644
--- a/lib/Serialization/GlobalModuleIndex.cpp
+++ b/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;
diff --git a/lib/Serialization/ModuleManager.cpp b/lib/Serialization/ModuleManager.cpp
index bc9917b582..b9f4d888f3 100644
--- a/lib/Serialization/ModuleManager.cpp
+++ b/lib/Serialization/ModuleManager.cpp
@@ -25,12 +25,14 @@ using namespace clang;
using namespace serialization;
ModuleFile *ModuleManager::lookup(StringRef Name) {
- const FileEntry *Entry = FileMgr.getFile(Name);
+ const FileEntry *Entry = FileMgr.getFile(Name, /*openFile=*/false,
+ /*cacheFailure=*/false);
return Modules[Entry];
}
llvm::MemoryBuffer *ModuleManager::lookupBuffer(StringRef Name) {
- const FileEntry *Entry = FileMgr.getFile(Name);
+ const FileEntry *Entry = FileMgr.getFile(Name, /*openFile=*/false,
+ /*cacheFailure=*/false);
return InMemoryBuffers[Entry];
}
@@ -38,7 +40,8 @@ std::pair<ModuleFile *, bool>
ModuleManager::addModule(StringRef FileName, ModuleKind Type,
SourceLocation ImportLoc, ModuleFile *ImportedBy,
unsigned Generation, std::string &ErrorStr) {
- const FileEntry *Entry = FileMgr.getFile(FileName);
+ const FileEntry *Entry = FileMgr.getFile(FileName, /*openFile=*/false,
+ /*cacheFailure=*/false);
if (!Entry && FileName != "-") {
ErrorStr = "file not found";
return std::make_pair(static_cast<ModuleFile*>(0), false);