X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FSupport%2FLockFileManager.cpp;h=2b7fc812d51972700ee0fcceb989609b03384a5c;hp=fb07801a14b630100843dd23e247d3f0c7427022;hb=7acd886ecfa0adc8a14476eafe8cf1fa981cfe18;hpb=20384a5583ef97644120f819e3d403652d36825d diff --git a/lib/Support/LockFileManager.cpp b/lib/Support/LockFileManager.cpp index fb07801a14b..2b7fc812d51 100644 --- a/lib/Support/LockFileManager.cpp +++ b/lib/Support/LockFileManager.cpp @@ -114,7 +114,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 = make_error_code(errc::no_space_on_device); + Error = make_error_code(std::errc::no_space_on_device); sys::fs::remove(UniqueLockFileName.c_str()); return; } @@ -124,10 +124,10 @@ LockFileManager::LockFileManager(StringRef FileName) // Create a link from the lock file name. If this succeeds, we're done. error_code EC = sys::fs::create_link(UniqueLockFileName.str(), LockFileName.str()); - if (EC == errc::success) + if (!EC) return; - if (EC != errc::file_exists) { + if (EC != std::errc::file_exists) { Error = EC; return; } @@ -196,7 +196,7 @@ LockFileManager::WaitForUnlockResult LockFileManager::waitForUnlock() { #if LLVM_ON_WIN32 Sleep(Interval); #else - nanosleep(&Interval, NULL); + nanosleep(&Interval, nullptr); #endif bool LockFileJustDisappeared = false;