r190108 - Add a bit more info to modules fatal error.

Eli Friedman eli.friedman at gmail.com
Thu Sep 5 16:50:58 PDT 2013


Author: efriedma
Date: Thu Sep  5 18:50:58 2013
New Revision: 190108

URL: http://llvm.org/viewvc/llvm-project?rev=190108&view=rev
Log:
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.

Modified:
    cfe/trunk/lib/Serialization/ModuleManager.cpp

Modified: cfe/trunk/lib/Serialization/ModuleManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ModuleManager.cpp?rev=190108&r1=190107&r2=190108&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ModuleManager.cpp (original)
+++ cfe/trunk/lib/Serialization/ModuleManager.cpp Thu Sep  5 18:50:58 2013
@@ -62,11 +62,13 @@ ModuleManager::addModule(StringRef FileN
   // 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;
   }
 





More information about the cfe-commits mailing list