llvm-cov: Fix some funny indentation (NFC)
[oota-llvm.git] / include / llvm / Support / LockFileManager.h
index e2fa8ebc56e40f999da6cb390cd56f840c2576ab..523a781b87d609b0fbb50a8dd653bd42a0ba0464 100644 (file)
@@ -40,15 +40,26 @@ public:
     LFS_Error
   };
 
+  /// \brief Describes the result of waiting for the owner to release the lock.
+  enum WaitForUnlockResult {
+    /// \brief The lock was released successfully.
+    Res_Success,
+    /// \brief Owner died while holding the lock.
+    Res_OwnerDied,
+    /// \brief Reached timeout while waiting for the owner to release the lock.
+    Res_Timeout
+  };
+
 private:
+  SmallString<128> FileName;
   SmallString<128> LockFileName;
   SmallString<128> UniqueLockFileName;
 
   Optional<std::pair<std::string, int> > Owner;
   Optional<error_code> Error;
 
-  LockFileManager(const LockFileManager &);
-  LockFileManager &operator=(const LockFileManager &);
+  LockFileManager(const LockFileManager &) LLVM_DELETED_FUNCTION;
+  LockFileManager &operator=(const LockFileManager &) LLVM_DELETED_FUNCTION;
 
   static Optional<std::pair<std::string, int> >
   readLockFile(StringRef LockFileName);
@@ -66,7 +77,7 @@ public:
   operator LockFileState() const { return getState(); }
 
   /// \brief For a shared lock, wait until the owner releases the lock.
-  void waitForUnlock();
+  WaitForUnlockResult waitForUnlock();
 };
 
 } // end namespace llvm