[cfe-commits] r172035 - /cfe/trunk/lib/Frontend/CompilerInstance.cpp

Douglas Gregor dgregor at apple.com
Wed Jan 9 18:04:18 PST 2013


Author: dgregor
Date: Wed Jan  9 20:04:18 2013
New Revision: 172035

URL: http://llvm.org/viewvc/llvm-project?rev=172035&view=rev
Log:
Be more careful about updating the failed-modules set

Modified:
    cfe/trunk/lib/Frontend/CompilerInstance.cpp

Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInstance.cpp?rev=172035&r1=172034&r2=172035&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInstance.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInstance.cpp Wed Jan  9 20:04:18 2013
@@ -982,7 +982,7 @@
       compileModule(*this, ModuleNameLoc, Module, ModuleFileName);
       ModuleFile = FileMgr->getFile(ModuleFileName);
 
-      if (!ModuleFile)
+      if (!ModuleFile && getPreprocessorOpts().FailedModules)
         getPreprocessorOpts().FailedModules->addFailed(ModuleName);
     }
 
@@ -1057,7 +1057,8 @@
           ModuleManager->ReadAST(ModuleFileName,
                                  serialization::MK_Module, ImportLoc,
                                  ASTReader::ARR_None) != ASTReader::Success) {
-        getPreprocessorOpts().FailedModules->addFailed(ModuleName);
+        if (getPreprocessorOpts().FailedModules)
+          getPreprocessorOpts().FailedModules->addFailed(ModuleName);
         KnownModules[Path[0].first] = 0;
         return ModuleLoadResult();
       }





More information about the cfe-commits mailing list