[llvm] r318524 - [Support][CachePruning] Fix regression in pruning interval

Ben Dunbobbin via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 17 06:42:18 PST 2017


Author: bd1976llvm
Date: Fri Nov 17 06:42:18 2017
New Revision: 318524

URL: http://llvm.org/viewvc/llvm-project?rev=318524&view=rev
Log:
[Support][CachePruning] Fix regression in pruning interval

Fixed broken comparison.
borked by: rL284966 (see: https://reviews.llvm.org/D25730).

Differential Revision: https://reviews.llvm.org/D40119

This is a second attempt to commit this.
The first attempt broke lld and gold tests that had been written against
the incorrect behaivour.

Modified:
    llvm/trunk/lib/Support/CachePruning.cpp

Modified: llvm/trunk/lib/Support/CachePruning.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CachePruning.cpp?rev=318524&r1=318523&r2=318524&view=diff
==============================================================================
--- llvm/trunk/lib/Support/CachePruning.cpp (original)
+++ llvm/trunk/lib/Support/CachePruning.cpp Fri Nov 17 06:42:18 2017
@@ -161,7 +161,7 @@ bool llvm::pruneCache(StringRef Path, Ca
       return false;
     }
   } else {
-    if (Policy.Interval == seconds(0)) {
+    if (Policy.Interval != seconds(0)) {
       // Check whether the time stamp is older than our pruning interval.
       // If not, do nothing.
       const auto TimeStampModTime = FileStatus.getLastModificationTime();




More information about the llvm-commits mailing list