summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/Support/LockFileManager.h4
-rw-r--r--llvm/lib/Support/LockFileManager.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/llvm/include/llvm/Support/LockFileManager.h b/llvm/include/llvm/Support/LockFileManager.h
index f14ac1cee94..3d1446ddb4b 100644
--- a/llvm/include/llvm/Support/LockFileManager.h
+++ b/llvm/include/llvm/Support/LockFileManager.h
@@ -56,7 +56,7 @@ private:
SmallString<128> UniqueLockFileName;
Optional<std::pair<std::string, int> > Owner;
- Optional<std::error_code> Error;
+ std::error_code ErrorCode;
std::string ErrorDiagMsg;
LockFileManager(const LockFileManager &) = delete;
@@ -89,7 +89,7 @@ public:
/// \brief Set error and error message
void setError(const std::error_code &EC, StringRef ErrorMsg = "") {
- Error = EC;
+ ErrorCode = EC;
ErrorDiagMsg = ErrorMsg.str();
}
};
diff --git a/llvm/lib/Support/LockFileManager.cpp b/llvm/lib/Support/LockFileManager.cpp
index ad749e0bd78..3b5a8b5afb4 100644
--- a/llvm/lib/Support/LockFileManager.cpp
+++ b/llvm/lib/Support/LockFileManager.cpp
@@ -261,16 +261,16 @@ LockFileManager::LockFileState LockFileManager::getState() const {
if (Owner)
return LFS_Shared;
- if (Error)
+ if (ErrorCode)
return LFS_Error;
return LFS_Owned;
}
std::string LockFileManager::getErrorMessage() const {
- if (Error) {
+ if (ErrorCode) {
std::string Str(ErrorDiagMsg);
- std::string ErrCodeMsg = Error->message();
+ std::string ErrCodeMsg = ErrorCode.message();
raw_string_ostream OSS(Str);
if (!ErrCodeMsg.empty())
OSS << ": " << ErrCodeMsg;
OpenPOWER on IntegriCloud