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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user