From 5c43245bf459c77077b607e1b55e6928cfbe464e Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Thu, 21 Feb 2013 00:27:28 +0000 Subject: Provide a "None" value for convenience when using Optional() 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 --- lib/Support/LockFileManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Support/LockFileManager.cpp') diff --git a/lib/Support/LockFileManager.cpp b/lib/Support/LockFileManager.cpp index 31eec751b7..92d8b83cf9 100644 --- a/lib/Support/LockFileManager.cpp +++ b/lib/Support/LockFileManager.cpp @@ -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 >(); + 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 >(); + return None; } bool LockFileManager::processStillExecuting(StringRef Hostname, int PID) { -- cgit v1.2.3