[llvm] r269565 - CachePruning.cpp: Don't use errno.
NAKAMURA Takumi via llvm-commits
llvm-commits at lists.llvm.org
Sat May 14 07:21:40 PDT 2016
Author: chapuni
Date: Sat May 14 09:21:39 2016
New Revision: 269565
URL: http://llvm.org/viewvc/llvm-project?rev=269565&view=rev
Log:
CachePruning.cpp: Don't use errno.
Modified:
llvm/trunk/lib/Support/CachePruning.cpp
Modified: llvm/trunk/lib/Support/CachePruning.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CachePruning.cpp?rev=269565&r1=269564&r2=269565&view=diff
==============================================================================
--- llvm/trunk/lib/Support/CachePruning.cpp (original)
+++ llvm/trunk/lib/Support/CachePruning.cpp Sat May 14 09:21:39 2016
@@ -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 {
More information about the llvm-commits
mailing list