[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.

llvm-svn: 318524
This commit is contained in:
Ben Dunbobbin 2017-11-17 14:42:18 +00:00
parent 024d0b3bb9
commit cac52140bc
1 changed files with 1 additions and 1 deletions

View 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();