diff options
author | Douglas Gregor <dgregor@apple.com> | 2013-03-22 21:26:48 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2013-03-22 21:26:48 +0000 |
commit | ed2fc2a311065ee5f6c20adb1655702aff86ae8a (patch) | |
tree | 14442f7ae068fd5e00be0ceeca526d961a6468fe /lib/Frontend | |
parent | 0f3a34fb7fea37ebfbcba8b400ccb697b9559b49 (diff) |
<rdar://problem/13479539> Only rebuild the global module cache when we're allowed to.
This eliminates excessive rebuilds of the global module cache.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177766 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend')
-rw-r--r-- | lib/Frontend/CompilerInstance.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index 633f3c5868..f83c8704f6 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/lib/Frontend/CompilerInstance.cpp @@ -62,7 +62,8 @@ void CompilerInstance::setInvocation(CompilerInvocation *Value) { bool CompilerInstance::shouldBuildGlobalModuleIndex() const { return (BuildGlobalModuleIndex || - (ModuleManager && ModuleManager->isGlobalIndexUnavailable())) && + (ModuleManager && ModuleManager->isGlobalIndexUnavailable() && + getFrontendOpts().GenerateGlobalModuleIndex)) && !ModuleBuildFailed; } |