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;
}
// 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;
}
#if LLVM_ON_WIN32
Sleep(Interval);
#else
- nanosleep(&Interval, NULL);
+ nanosleep(&Interval, nullptr);
#endif
bool LockFileJustDisappeared = false;