mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-11 13:37:07 +00:00
CachePruning.cpp: Don't use errno.
llvm-svn: 269565
This commit is contained in:
parent
7fe85f6276
commit
aeb7097dd2
@ -14,6 +14,7 @@
|
||||
#include "llvm/Support/CachePruning.h"
|
||||
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/Errc.h"
|
||||
#include "llvm/Support/FileSystem.h"
|
||||
#include "llvm/Support/Path.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
@ -54,8 +55,8 @@ bool CachePruning::prune() {
|
||||
sys::path::append(TimestampFile, "llvmcache.timestamp");
|
||||
sys::fs::file_status FileStatus;
|
||||
sys::TimeValue CurrentTime = sys::TimeValue::now();
|
||||
if (sys::fs::status(TimestampFile, FileStatus)) {
|
||||
if (errno == ENOENT) {
|
||||
if (auto EC = sys::fs::status(TimestampFile, FileStatus)) {
|
||||
if (EC == errc::no_such_file_or_directory) {
|
||||
// If the timestamp file wasn't there, create one now.
|
||||
writeTimestampFile(TimestampFile);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user