Add a bit more info to modules fatal error.

Just a minor tweak to make it easier to track down the cause of fatal errors
with modules.

llvm-svn: 190108
This commit is contained in:
Eli Friedman
2013-09-05 23:50:58 +00:00
parent 93d674f7b3
commit c27d0d5ef2

View File

@@ -62,11 +62,13 @@ ModuleManager::addModule(StringRef FileName, ModuleKind Type,
// Look for the file entry. This only fails if the expected size or
// modification time differ.
const FileEntry *Entry;
if (lookupModuleFile(FileName, ExpectedSize, ExpectedModTime, Entry))
if (lookupModuleFile(FileName, ExpectedSize, ExpectedModTime, Entry)) {
ErrorStr = "module file out of date";
return OutOfDate;
}
if (!Entry && FileName != "-") {
ErrorStr = "file not found";
ErrorStr = "module file not found";
return Missing;
}