aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2013-03-25 21:19:16 +0000
committerDouglas Gregor <dgregor@apple.com>2013-03-25 21:19:16 +0000
commitd44d2872b2ebe58237de4dbc350b82cab944ccc5 (patch)
treeeed9bd6af86d336dc70c0128a46a20cff69bfa81 /lib/Frontend/CompilerInvocation.cpp
parentfd61d6fe0aa9853f0577ca88a63901c3773e8101 (diff)
<rdar://problem/13434605> Periodically prune the module cache so that it does not grow forever.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177918 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--lib/Frontend/CompilerInvocation.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index 301a082cbd..2d945b5b04 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -836,7 +836,10 @@ static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args) {
Opts.ResourceDir = Args.getLastArgValue(OPT_resource_dir);
Opts.ModuleCachePath = Args.getLastArgValue(OPT_fmodules_cache_path);
Opts.DisableModuleHash = Args.hasArg(OPT_fdisable_module_hash);
-
+ Opts.ModuleCachePruneInterval
+ = Args.getLastArgIntValue(OPT_fmodules_prune_interval, 7*24*60*60);
+ Opts.ModuleCachePruneAfter
+ = Args.getLastArgIntValue(OPT_fmodules_prune_after, 31*24*60*60);
for (arg_iterator it = Args.filtered_begin(OPT_fmodules_ignore_macro),
ie = Args.filtered_end(); it != ie; ++it) {
StringRef MacroDef = (*it)->getValue();