diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-05-31 03:21:04 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-05-31 03:21:04 +0000 |
commit | c145fd3cf5f9b9bb666267869eb556c54cdd5194 (patch) | |
tree | 23cbd36525dc9cc3318368e76ec2e8e2c48b53ef | |
parent | 1028cc76ef8b40a933aba58cc531ccf466951771 (diff) | |
download | llvm-c145fd3cf5f9b9bb666267869eb556c54cdd5194.tar.gz llvm-c145fd3cf5f9b9bb666267869eb556c54cdd5194.tar.bz2 llvm-c145fd3cf5f9b9bb666267869eb556c54cdd5194.tar.xz |
There is no std::errc::success, remove the llvm one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209960 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Support/system_error.h | 2 | ||||
-rw-r--r-- | lib/Object/Error.cpp | 2 | ||||
-rw-r--r-- | lib/ProfileData/InstrProf.cpp | 2 | ||||
-rw-r--r-- | lib/Support/LockFileManager.cpp | 2 | ||||
-rw-r--r-- | lib/Support/Unix/Program.inc | 4 | ||||
-rw-r--r-- | tools/llvm-readobj/Error.cpp | 2 | ||||
-rw-r--r-- | tools/obj2yaml/Error.cpp | 2 |
7 files changed, 7 insertions, 9 deletions
diff --git a/include/llvm/Support/system_error.h b/include/llvm/Support/system_error.h index 9854a9ee85..9d300fb991 100644 --- a/include/llvm/Support/system_error.h +++ b/include/llvm/Support/system_error.h @@ -483,7 +483,6 @@ template <class Tp> struct is_error_condition_enum : public std::false_type {}; // for them: enum class errc { - success = 0, address_family_not_supported = EAFNOSUPPORT, address_in_use = EADDRINUSE, address_not_available = EADDRNOTAVAIL, @@ -810,7 +809,6 @@ inline bool operator!=(const error_condition& _x, const error_condition& _y) { // // error_code( ::GetLastError(), system_category() ) enum class windows_error { - success = 0, // These names and values are based on Windows WinError.h // This is not a complete list. Add to this list if you need to explicitly // check for it. diff --git a/lib/Object/Error.cpp b/lib/Object/Error.cpp index 8e508696cf..6f72849ae2 100644 --- a/lib/Object/Error.cpp +++ b/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/lib/ProfileData/InstrProf.cpp b/lib/ProfileData/InstrProf.cpp index de2b13dafd..60a8efb2a6 100644 --- a/lib/ProfileData/InstrProf.cpp +++ b/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/lib/Support/LockFileManager.cpp b/lib/Support/LockFileManager.cpp index 9b4bfbe819..05e75cff1a 100644 --- a/lib/Support/LockFileManager.cpp +++ b/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/lib/Support/Unix/Program.inc b/lib/Support/Unix/Program.inc index 1225a9c042..f4c6cdf7e9 100644 --- a/lib/Support/Unix/Program.inc +++ b/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) { diff --git a/tools/llvm-readobj/Error.cpp b/tools/llvm-readobj/Error.cpp index 83ed6a7dfc..75c392e0f9 100644 --- a/tools/llvm-readobj/Error.cpp +++ b/tools/llvm-readobj/Error.cpp @@ -50,7 +50,7 @@ std::string _readobj_error_category::message(int ev) const { error_condition _readobj_error_category::default_error_condition(int ev) const { if (ev == readobj_error::success) - return errc::success; + return error_condition(); return errc::invalid_argument; } diff --git a/tools/obj2yaml/Error.cpp b/tools/obj2yaml/Error.cpp index 7be468dd56..0003b7bb8d 100644 --- a/tools/obj2yaml/Error.cpp +++ b/tools/obj2yaml/Error.cpp @@ -42,7 +42,7 @@ std::string _obj2yaml_error_category::message(int ev) const { error_condition _obj2yaml_error_category::default_error_condition(int ev) const { if (ev == obj2yaml_error::success) - return errc::success; + return error_condition(); return errc::invalid_argument; } |