From f575d6e7c3b887ea4c5394d2c7e322c7a929a57e Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 25 Jan 2013 00:45:27 +0000 Subject: Rename the -cc1 option "-generate-module-index" to "-fmodules-global-index" and expand its behavior to include both the use and generation of the global module index. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173404 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/FrontendAction.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/Frontend/FrontendAction.cpp') 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()); -- cgit v1.2.3-18-g5258