summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/LockFileManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/LockFileManager.cpp')
-rw-r--r--llvm/lib/Support/LockFileManager.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/Support/LockFileManager.cpp b/llvm/lib/Support/LockFileManager.cpp
index 0204e75f84e..0ca631cb634 100644
--- a/llvm/lib/Support/LockFileManager.cpp
+++ b/llvm/lib/Support/LockFileManager.cpp
@@ -22,7 +22,6 @@
#include <unistd.h>
#endif
using namespace llvm;
-using std::error_code;
/// \brief Attempt to read the lock file with the given name, if it exists.
///
@@ -72,7 +71,7 @@ bool LockFileManager::processStillExecuting(StringRef Hostname, int PID) {
LockFileManager::LockFileManager(StringRef FileName)
{
this->FileName = FileName;
- if (error_code EC = sys::fs::make_absolute(this->FileName)) {
+ if (std::error_code EC = sys::fs::make_absolute(this->FileName)) {
Error = EC;
return;
}
@@ -88,10 +87,8 @@ LockFileManager::LockFileManager(StringRef FileName)
UniqueLockFileName = LockFileName;
UniqueLockFileName += "-%%%%%%%%";
int UniqueLockFileID;
- if (error_code EC
- = sys::fs::createUniqueFile(UniqueLockFileName.str(),
- UniqueLockFileID,
- UniqueLockFileName)) {
+ if (std::error_code EC = sys::fs::createUniqueFile(
+ UniqueLockFileName.str(), UniqueLockFileID, UniqueLockFileName)) {
Error = EC;
return;
}
@@ -123,7 +120,7 @@ LockFileManager::LockFileManager(StringRef FileName)
while (1) {
// Create a link from the lock file name. If this succeeds, we're done.
- error_code EC =
+ std::error_code EC =
sys::fs::create_link(UniqueLockFileName.str(), LockFileName.str());
if (!EC)
return;
OpenPOWER on IntegriCloud