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 | 11ef0b7778e5a8d18f75b4969acbcd8b86b0cbc4 (patch) | |
tree | 7ab4120d0b1f6149d78c1e2930dcd6ffef6f9b9f /clang/lib/Frontend/CompilerInstance.cpp | |
parent | 25fac2f6dc4daa98f89b1581552cc3e8b185f2d4 (diff) | |
download | bcm5719-llvm-11ef0b7778e5a8d18f75b4969acbcd8b86b0cbc4.tar.gz bcm5719-llvm-11ef0b7778e5a8d18f75b4969acbcd8b86b0cbc4.zip |
<rdar://problem/13479539> Only rebuild the global module cache when we're allowed to.
This eliminates excessive rebuilds of the global module cache.
llvm-svn: 177766
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 633f3c58689..f83c8704f67 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/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; } |