diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Object/Error.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/ProfileData/InstrProf.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Support/LockFileManager.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Support/Unix/Program.inc | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Object/Error.cpp b/llvm/lib/Object/Error.cpp index 8e508696cfb..6f72849ae27 100644 --- a/llvm/lib/Object/Error.cpp +++ b/llvm/lib/Object/Error.cpp @@ -49,7 +49,7 @@ std::string _object_error_category::message(int ev) const { error_condition _object_error_category::default_error_condition(int ev) const { if (ev == object_error::success) - return errc::success; + return error_condition(); return errc::invalid_argument; } diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp index de2b13dafd0..60a8efb2a6a 100644 --- a/llvm/lib/ProfileData/InstrProf.cpp +++ b/llvm/lib/ProfileData/InstrProf.cpp @@ -54,7 +54,7 @@ class InstrProfErrorCategoryType : public error_category { } error_condition default_error_condition(int EV) const override { if (EV == instrprof_error::success) - return errc::success; + return error_condition(); return errc::invalid_argument; } }; diff --git a/llvm/lib/Support/LockFileManager.cpp b/llvm/lib/Support/LockFileManager.cpp index 9b4bfbe8198..05e75cff1ac 100644 --- a/llvm/lib/Support/LockFileManager.cpp +++ b/llvm/lib/Support/LockFileManager.cpp @@ -124,7 +124,7 @@ LockFileManager::LockFileManager(StringRef FileName) // Create a link from the lock file name. If this succeeds, we're done. error_code EC = sys::fs::create_link(UniqueLockFileName.str(), LockFileName.str()); - if (EC == errc::success) + if (!EC) return; if (EC != errc::file_exists) { diff --git a/llvm/lib/Support/Unix/Program.inc b/llvm/lib/Support/Unix/Program.inc index 1225a9c042e..f4c6cdf7e99 100644 --- a/llvm/lib/Support/Unix/Program.inc +++ b/llvm/lib/Support/Unix/Program.inc @@ -427,12 +427,12 @@ ProcessInfo sys::Wait(const ProcessInfo &PI, unsigned SecondsToWait, error_code sys::ChangeStdinToBinary(){ // Do nothing, as Unix doesn't differentiate between text and binary. - return make_error_code(errc::success); + return error_code(); } error_code sys::ChangeStdoutToBinary(){ // Do nothing, as Unix doesn't differentiate between text and binary. - return make_error_code(errc::success); + return error_code(); } bool llvm::sys::argumentsFitWithinSystemLimits(ArrayRef<const char*> Args) { |