diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2013-09-05 23:50:58 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2013-09-05 23:50:58 +0000 |
commit | c27d0d5ef26adc71074b699da9a12e78970fbaee (patch) | |
tree | 2714a56a3e48fa14da0d161cff5053b9e3c5d49a /clang/lib/Serialization/ModuleManager.cpp | |
parent | 93d674f7b39d48bfd9ca056175522ec169cf7a9a (diff) | |
download | bcm5719-llvm-c27d0d5ef26adc71074b699da9a12e78970fbaee.tar.gz bcm5719-llvm-c27d0d5ef26adc71074b699da9a12e78970fbaee.zip |
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
Diffstat (limited to 'clang/lib/Serialization/ModuleManager.cpp')
-rw-r--r-- | clang/lib/Serialization/ModuleManager.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Serialization/ModuleManager.cpp b/clang/lib/Serialization/ModuleManager.cpp index f75c3b2b33a..9c4b3d92bef 100644 --- a/clang/lib/Serialization/ModuleManager.cpp +++ b/clang/lib/Serialization/ModuleManager.cpp @@ -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; } |