summaryrefslogtreecommitdiff
path: root/lib/Support/LockFileManager.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-06-13 17:20:48 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-06-13 17:20:48 +0000
commitd8b23109b26f2070e21d5515ed2472ca9ab0111c (patch)
treeee7abbcf41f5cecd956761c5bcc135a53c6f10ab /lib/Support/LockFileManager.cpp
parent33fe993f2ec3a146e5954db14aa9a751141677f0 (diff)
downloadllvm-d8b23109b26f2070e21d5515ed2472ca9ab0111c.tar.gz
llvm-d8b23109b26f2070e21d5515ed2472ca9ab0111c.tar.bz2
llvm-d8b23109b26f2070e21d5515ed2472ca9ab0111c.tar.xz
Finishing touch for the std::error_code transition.
While std::error_code itself seems to work OK in all platforms, there are few annoying differences with regards to the std::errc enumeration. This patch adds a simple llvm enumeration, which will hopefully avoid build breakages in other platforms and surprises as we get more uses of std::error_code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210920 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/LockFileManager.cpp')
-rw-r--r--lib/Support/LockFileManager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Support/LockFileManager.cpp b/lib/Support/LockFileManager.cpp
index 0ca631cb63..681bae2ba1 100644
--- a/lib/Support/LockFileManager.cpp
+++ b/lib/Support/LockFileManager.cpp
@@ -9,6 +9,7 @@
#include "llvm/Support/LockFileManager.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
+#include "llvm/Support/Errc.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
@@ -112,7 +113,7 @@ LockFileManager::LockFileManager(StringRef FileName)
if (Out.has_error()) {
// We failed to write out PID, so make up an excuse, remove the
// unique lock file, and fail.
- Error = std::make_error_code(std::errc::no_space_on_device);
+ Error = make_error_code(errc::no_space_on_device);
sys::fs::remove(UniqueLockFileName.c_str());
return;
}
@@ -125,7 +126,7 @@ LockFileManager::LockFileManager(StringRef FileName)
if (!EC)
return;
- if (EC != std::errc::file_exists) {
+ if (EC != errc::file_exists) {
Error = EC;
return;
}