diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2017-11-13 23:32:19 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2017-11-13 23:32:19 +0000 |
commit | 8c42d323c9100b234df7f7d790eccda4954884f0 (patch) | |
tree | 116afc9fed90108140088f32121d423da78322c4 /llvm/lib/Support/LockFileManager.cpp | |
parent | 656c8629e20d2d522187a4bf59aabacec919c3ee (diff) | |
download | bcm5719-llvm-8c42d323c9100b234df7f7d790eccda4954884f0.tar.gz bcm5719-llvm-8c42d323c9100b234df7f7d790eccda4954884f0.zip |
Simplify and rename variable.
std::error_code can represent success, so we don't need a
Optional<std::error_code>.
Rename the variable to avoid confusion with the type Error.
llvm-svn: 318111
Diffstat (limited to 'llvm/lib/Support/LockFileManager.cpp')
-rw-r--r-- | llvm/lib/Support/LockFileManager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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; |