[Support][CachePruning] Fix regression in pruning interval
authorBen Dunbobbin <bd1976llvm@gmail.com>
Thu, 16 Nov 2017 13:15:56 +0000 (13:15 +0000)
committerBen Dunbobbin <bd1976llvm@gmail.com>
Thu, 16 Nov 2017 13:15:56 +0000 (13:15 +0000)
Fixed broken comparison.
borked by: rL284966 (see: https://reviews.llvm.org/D25730).

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

llvm-svn: 318397

llvm/lib/Support/CachePruning.cpp

index 5a9580cf44097001740cd61598cfde3e6ba22072..271cfc58c959ec2ac85006bcd4b5113938f4b0d1 100644 (file)
@@ -161,7 +161,7 @@ bool llvm::pruneCache(StringRef Path, CachePruningPolicy Policy) {
       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();