X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=include%2Fllvm%2FSupport%2FLockFileManager.h;h=8e88d4279bd8786c6c41405179685786ef6d0e96;hb=ebe69fe11e48d322045d5949c83283927a0d790b;hp=61c65dabae3c9d785d59f201e55f7441c5ed116e;hpb=b7d2e72b02a4cb8034f32f8247a2558d2434e121;p=android-x86%2Fexternal-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