summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/LockFileManager.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-02-21 00:27:28 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-02-21 00:27:28 +0000
commitef04593de1bf4cc370131dd54f89b11637c53024 (patch)
tree0f20de2aa68d7d5023b864c15e5d2c85c075c087 /llvm/lib/Support/LockFileManager.cpp
parentf8db6917b3d29e38d75e32855f3757d487dc8a4a (diff)
downloadbcm5719-llvm-ef04593de1bf4cc370131dd54f89b11637c53024.tar.gz
bcm5719-llvm-ef04593de1bf4cc370131dd54f89b11637c53024.zip
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. llvm-svn: 175696
Diffstat (limited to 'llvm/lib/Support/LockFileManager.cpp')
-rw-r--r--llvm/lib/Support/LockFileManager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/LockFileManager.cpp b/llvm/lib/Support/LockFileManager.cpp
index 31eec751b7b..92d8b83cf94 100644
--- a/llvm/lib/Support/LockFileManager.cpp
+++ b/llvm/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<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) {
OpenPOWER on IntegriCloud