diff --git a/llvm/lib/Support/CachePruning.cpp b/llvm/lib/Support/CachePruning.cpp index 5a9580cf4409..271cfc58c959 100644 --- a/llvm/lib/Support/CachePruning.cpp +++ b/llvm/lib/Support/CachePruning.cpp @@ -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();