From 044eb2f6afba375a914ac9d8024f8f5142bb912e Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 18 Dec 2017 20:10:56 +0000 Subject: Vendor import of llvm trunk r321017: https://llvm.org/svn/llvm-project/llvm/trunk@321017 --- include/llvm/Support/LockFileManager.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'include/llvm/Support/LockFileManager.h') 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 #include // for std::pair @@ -53,10 +54,10 @@ public: private: SmallString<128> FileName; SmallString<128> LockFileName; - SmallString<128> UniqueLockFileName; + Optional UniqueLockFile; Optional > Owner; - Optional 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(); } }; -- cgit v1.2.3