diff options
Diffstat (limited to 'lib/Frontend/FrontendAction.cpp')
-rw-r--r-- | lib/Frontend/FrontendAction.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Frontend/FrontendAction.cpp b/lib/Frontend/FrontendAction.cpp index 4b642b395c..05064fbd4f 100644 --- a/lib/Frontend/FrontendAction.cpp +++ b/lib/Frontend/FrontendAction.cpp @@ -382,10 +382,9 @@ bool FrontendAction::Execute() { else ExecuteAction(); // If we are supposed to rebuild the global module index, do so now unless - // an error occurred. - if (CI.getBuildGlobalModuleIndex() && CI.hasFileManager() && - CI.hasPreprocessor() && - (!CI.hasDiagnostics() || !CI.getDiagnostics().hasErrorOccurred())) { + // there were any module-build failures. + if (CI.shouldBuildGlobalModuleIndex() && CI.hasFileManager() && + CI.hasPreprocessor()) { GlobalModuleIndex::writeIndex( CI.getFileManager(), CI.getPreprocessor().getHeaderSearchInfo().getModuleCachePath()); |