There is no std::errc::success, remove the llvm one.

llvm-svn: 209960
This commit is contained in:
Rafael Espindola 2014-05-31 03:21:04 +00:00
parent 3ae0620a45
commit a3f2e3f01e
7 changed files with 7 additions and 9 deletions

View File

@ -483,7 +483,6 @@ template <class Tp> struct is_error_condition_enum : public std::false_type {};
// for them: // for them:
enum class errc { enum class errc {
success = 0,
address_family_not_supported = EAFNOSUPPORT, address_family_not_supported = EAFNOSUPPORT,
address_in_use = EADDRINUSE, address_in_use = EADDRINUSE,
address_not_available = EADDRNOTAVAIL, address_not_available = EADDRNOTAVAIL,
@ -810,7 +809,6 @@ inline bool operator!=(const error_condition& _x, const error_condition& _y) {
// //
// error_code( ::GetLastError(), system_category() ) // error_code( ::GetLastError(), system_category() )
enum class windows_error { enum class windows_error {
success = 0,
// These names and values are based on Windows WinError.h // 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 // This is not a complete list. Add to this list if you need to explicitly
// check for it. // check for it.

View File

@ -49,7 +49,7 @@ std::string _object_error_category::message(int ev) const {
error_condition _object_error_category::default_error_condition(int ev) const { error_condition _object_error_category::default_error_condition(int ev) const {
if (ev == object_error::success) if (ev == object_error::success)
return errc::success; return error_condition();
return errc::invalid_argument; return errc::invalid_argument;
} }

View File

@ -54,7 +54,7 @@ class InstrProfErrorCategoryType : public error_category {
} }
error_condition default_error_condition(int EV) const override { error_condition default_error_condition(int EV) const override {
if (EV == instrprof_error::success) if (EV == instrprof_error::success)
return errc::success; return error_condition();
return errc::invalid_argument; return errc::invalid_argument;
} }
}; };

View File

@ -124,7 +124,7 @@ LockFileManager::LockFileManager(StringRef FileName)
// Create a link from the lock file name. If this succeeds, we're done. // Create a link from the lock file name. If this succeeds, we're done.
error_code EC = error_code EC =
sys::fs::create_link(UniqueLockFileName.str(), LockFileName.str()); sys::fs::create_link(UniqueLockFileName.str(), LockFileName.str());
if (EC == errc::success) if (!EC)
return; return;
if (EC != errc::file_exists) { if (EC != errc::file_exists) {

View File

@ -427,12 +427,12 @@ ProcessInfo sys::Wait(const ProcessInfo &PI, unsigned SecondsToWait,
error_code sys::ChangeStdinToBinary(){ error_code sys::ChangeStdinToBinary(){
// Do nothing, as Unix doesn't differentiate between text and binary. // Do nothing, as Unix doesn't differentiate between text and binary.
return make_error_code(errc::success); return error_code();
} }
error_code sys::ChangeStdoutToBinary(){ error_code sys::ChangeStdoutToBinary(){
// Do nothing, as Unix doesn't differentiate between text and binary. // 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) { bool llvm::sys::argumentsFitWithinSystemLimits(ArrayRef<const char*> Args) {

View File

@ -50,7 +50,7 @@ std::string _readobj_error_category::message(int ev) const {
error_condition _readobj_error_category::default_error_condition(int ev) const { error_condition _readobj_error_category::default_error_condition(int ev) const {
if (ev == readobj_error::success) if (ev == readobj_error::success)
return errc::success; return error_condition();
return errc::invalid_argument; return errc::invalid_argument;
} }

View File

@ -42,7 +42,7 @@ std::string _obj2yaml_error_category::message(int ev) const {
error_condition error_condition
_obj2yaml_error_category::default_error_condition(int ev) const { _obj2yaml_error_category::default_error_condition(int ev) const {
if (ev == obj2yaml_error::success) if (ev == obj2yaml_error::success)
return errc::success; return error_condition();
return errc::invalid_argument; return errc::invalid_argument;
} }