Remove 'using std::errro_code' from lib.

llvm-svn: 210871
This commit is contained in:
Rafael Espindola
2014-06-13 02:24:39 +00:00
parent 3453bcf64d
commit db4ed0bdab
42 changed files with 561 additions and 579 deletions

View File

@@ -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;