[PATCH] D40327: CachePruning: Allow limiting the number of files in the cache directory.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 22 10:09:24 PST 2017


pcc added a reviewer: tejohnson.
pcc added inline comments.


================
Comment at: llvm/lib/Support/CachePruning.cpp:232
 
+  auto FileAndSize = FileSizes.rbegin();
+  size_t NumFiles = FileSizes.size();
----------------
tejohnson wrote:
> I think you will need to change the way ShouldComputeSize is set above (i.e. OR in Policy.MaxSizeFiles > 0) to ensure it is true and therefore FileSizes and TotalSize have been computed at this point.
Done, also fixed a bug where we were exiting early above, and another bug where `prune_after=0s` did not behave as documented.


https://reviews.llvm.org/D40327





More information about the llvm-commits mailing list