#include "llvm/Support/CachePruning.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/WithColor.h"
#include "llvm/Support/raw_ostream.h"
#define DEBUG_TYPE …
#include <set>
#include <system_error>
usingnamespacellvm;
namespace {
struct FileInfo { … };
}
static void writeTimestampFile(StringRef TimestampFile) { … }
static Expected<std::chrono::seconds> parseDuration(StringRef Duration) { … }
Expected<CachePruningPolicy>
llvm::parseCachePruningPolicy(StringRef PolicyStr) { … }
bool llvm::pruneCache(StringRef Path, CachePruningPolicy Policy,
const std::vector<std::unique_ptr<MemoryBuffer>> &Files) { … }