From 01b8445ea6036613d34e344765760bded49ee871 Mon Sep 17 00:00:00 2001 From: Pawel Bylica Date: Mon, 27 Jun 2016 08:46:23 +0000 Subject: [PATCH] CachePruning: correct comment about file order. NFC Summary: Actually the list of cached files is sorted by file size, not by last accessed time. Also remove unused file access time param for a helper function. Reviewers: joker-eph, chandlerc, davide Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D21639 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273852 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/CachePruning.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Support/CachePruning.cpp b/lib/Support/CachePruning.cpp index 944f41df227..bd42befce38 100644 --- a/lib/Support/CachePruning.cpp +++ b/lib/Support/CachePruning.cpp @@ -88,9 +88,9 @@ bool CachePruning::prune() { std::set> FileSizes; uint64_t TotalSize = 0; // Helper to add a path to the set of files to consider for size-based - // pruning, sorted by last accessed time. + // pruning, sorted by size. auto AddToFileListForSizePruning = - [&](StringRef Path, sys::TimeValue FileAccessTime) { + [&](StringRef Path) { if (!ShouldComputeSize) return; TotalSize += FileStatus.getSize(); @@ -128,7 +128,7 @@ bool CachePruning::prune() { } // Leave it here for now, but add it to the list of size-based pruning. - AddToFileListForSizePruning(File->path(), FileAccessTime); + AddToFileListForSizePruning(File->path()); } // Prune for size now if needed -- 2.50.1