diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:10:56 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:10:56 +0000 |
commit | 044eb2f6afba375a914ac9d8024f8f5142bb912e (patch) | |
tree | 1475247dc9f9fe5be155ebd4c9069c75aadf8c20 /include/llvm/Support/LockFileManager.h | |
parent | eb70dddbd77e120e5d490bd8fbe7ff3f8fa81c6b (diff) |
Notes
Diffstat (limited to 'include/llvm/Support/LockFileManager.h')
-rw-r--r-- | include/llvm/Support/LockFileManager.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/llvm/Support/LockFileManager.h b/include/llvm/Support/LockFileManager.h index 13d252425b93a..1e417bdd5b253 100644 --- a/include/llvm/Support/LockFileManager.h +++ b/include/llvm/Support/LockFileManager.h @@ -11,6 +11,7 @@ #include "llvm/ADT/Optional.h" #include "llvm/ADT/SmallString.h" +#include "llvm/Support/FileSystem.h" #include <system_error> #include <utility> // for std::pair @@ -53,10 +54,10 @@ public: private: SmallString<128> FileName; SmallString<128> LockFileName; - SmallString<128> UniqueLockFileName; + Optional<sys::fs::TempFile> UniqueLockFile; Optional<std::pair<std::string, int> > Owner; - Optional<std::error_code> Error; + std::error_code ErrorCode; std::string ErrorDiagMsg; LockFileManager(const LockFileManager &) = delete; @@ -88,8 +89,8 @@ public: std::string getErrorMessage() const; /// \brief Set error and error message - void setError(std::error_code &EC, StringRef ErrorMsg = "") { - Error = EC; + void setError(const std::error_code &EC, StringRef ErrorMsg = "") { + ErrorCode = EC; ErrorDiagMsg = ErrorMsg.str(); } }; |