summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2016-05-14 14:21:39 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2016-05-14 14:21:39 +0000
commitf5e36ad863f60b57185e0453936e25d93bf05f0f (patch)
treef8a87ce9d8cef6a6bdb0d2e46e861eda7eb50ae6
parent590d7b2e4adde6dd58e825c76a0fc3b002dbfb9d (diff)
downloadbcm5719-llvm-f5e36ad863f60b57185e0453936e25d93bf05f0f.tar.gz
bcm5719-llvm-f5e36ad863f60b57185e0453936e25d93bf05f0f.zip
CachePruning.cpp: Don't use errno.
llvm-svn: 269565
-rw-r--r--llvm/lib/Support/CachePruning.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Support/CachePruning.cpp b/llvm/lib/Support/CachePruning.cpp
index 75da2e70ec9..944f41df227 100644
--- a/llvm/lib/Support/CachePruning.cpp
+++ b/llvm/lib/Support/CachePruning.cpp
@@ -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 {
OpenPOWER on IntegriCloud