mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-18 11:24:01 +00:00
Provide a "None" value for convenience when using Optional<T>()
This implementation of NoneType/None does have some holes but I haven't found one that doesn't - open to improvement. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175696 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -31,7 +31,7 @@ LockFileManager::readLockFile(StringRef LockFileName) {
|
||||
// to read, so we just return.
|
||||
bool Exists = false;
|
||||
if (sys::fs::exists(LockFileName, Exists) || !Exists)
|
||||
return Optional<std::pair<std::string, int> >();
|
||||
return None;
|
||||
|
||||
// Read the owning host and PID out of the lock file. If it appears that the
|
||||
// owning process is dead, the lock file is invalid.
|
||||
@ -45,7 +45,7 @@ LockFileManager::readLockFile(StringRef LockFileName) {
|
||||
// Delete the lock file. It's invalid anyway.
|
||||
bool Existed;
|
||||
sys::fs::remove(LockFileName, Existed);
|
||||
return Optional<std::pair<std::string, int> >();
|
||||
return None;
|
||||
}
|
||||
|
||||
bool LockFileManager::processStillExecuting(StringRef Hostname, int PID) {
|
||||
|
Reference in New Issue
Block a user