diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2015-03-24 21:44:25 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2015-03-24 21:44:25 +0000 |
commit | 580dd296fadf13aa3cadc4975de4745b8a231f8b (patch) | |
tree | 23fe7d68b52bb72a1234d91f6ecc84c3febfb30c /clang/lib/Frontend/CompilerInstance.cpp | |
parent | e37e10dc5735a2757988ec1484b37606fc6b37e6 (diff) | |
download | bcm5719-llvm-580dd296fadf13aa3cadc4975de4745b8a231f8b.tar.gz bcm5719-llvm-580dd296fadf13aa3cadc4975de4745b8a231f8b.zip |
[Modules] Stop creating timestamps for the modules cache and trying to
prune it when we have disabled implicit module generation and thus are
not using any cached modules.
Also update a test of explicitly generated modules to pass this CC1 flag
correctly.
This fixes an issue where Clang was dropping files into the source tree
while running its tests.
llvm-svn: 233117
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index b23baa5dbbd..1c5b3222304 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -1239,9 +1239,10 @@ void CompilerInstance::createModuleManager() { if (!hasASTContext()) createASTContext(); - // If we're not recursively building a module, check whether we - // need to prune the module cache. - if (getSourceManager().getModuleBuildStack().empty() && + // If we're implicitly building modules but not currently recursively + // building a module, check whether we need to prune the module cache. + if (getLangOpts().ImplicitModules && + getSourceManager().getModuleBuildStack().empty() && getHeaderSearchOpts().ModuleCachePruneInterval > 0 && getHeaderSearchOpts().ModuleCachePruneAfter > 0) { pruneModuleCache(getHeaderSearchOpts()); |