X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FSupport%2FLockFileManager.h;h=8e88d4279bd8786c6c41405179685786ef6d0e96;hb=0b897129c1e1bb5da8f8eb62d7c91f8cfbe6b4be;hp=61c65dabae3c9d785d59f201e55f7441c5ed116e;hpb=5c792faa0e5560bc148c973f3df658eb3bb2061e;p=oota-llvm.git diff --git a/include/llvm/Support/LockFileManager.h b/include/llvm/Support/LockFileManager.h index 61c65dabae3..8e88d4279bd 100644 --- a/include/llvm/Support/LockFileManager.h +++ b/include/llvm/Support/LockFileManager.h @@ -57,8 +57,8 @@ private: Optional > Owner; Optional Error; - LockFileManager(const LockFileManager &) LLVM_DELETED_FUNCTION; - LockFileManager &operator=(const LockFileManager &) LLVM_DELETED_FUNCTION; + LockFileManager(const LockFileManager &) = delete; + LockFileManager &operator=(const LockFileManager &) = delete; static Optional > readLockFile(StringRef LockFileName); @@ -77,6 +77,10 @@ public: /// \brief For a shared lock, wait until the owner releases the lock. WaitForUnlockResult waitForUnlock(); + + /// \brief Remove the lock file. This may delete a different lock file than + /// the one previously read if there is a race. + std::error_code unsafeRemoveLockFile(); }; } // end namespace llvm