[llvm] r209960 - There is no std::errc::success, remove the llvm one.
Rafael Espindola
rafael.espindola at gmail.com
Fri May 30 20:21:05 PDT 2014
Author: rafael
Date: Fri May 30 22:21:04 2014
New Revision: 209960
URL: http://llvm.org/viewvc/llvm-project?rev=209960&view=rev
Log:
There is no std::errc::success, remove the llvm one.
Modified:
llvm/trunk/include/llvm/Support/system_error.h
llvm/trunk/lib/Object/Error.cpp
llvm/trunk/lib/ProfileData/InstrProf.cpp
llvm/trunk/lib/Support/LockFileManager.cpp
llvm/trunk/lib/Support/Unix/Program.inc
llvm/trunk/tools/llvm-readobj/Error.cpp
llvm/trunk/tools/obj2yaml/Error.cpp
Modified: llvm/trunk/include/llvm/Support/system_error.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/system_error.h?rev=209960&r1=209959&r2=209960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/system_error.h (original)
+++ llvm/trunk/include/llvm/Support/system_error.h Fri May 30 22:21:04 2014
@@ -483,7 +483,6 @@ template <class Tp> struct is_error_cond
// 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_condi
//
// 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.
Modified: llvm/trunk/lib/Object/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/Error.cpp?rev=209960&r1=209959&r2=209960&view=diff
==============================================================================
--- llvm/trunk/lib/Object/Error.cpp (original)
+++ llvm/trunk/lib/Object/Error.cpp Fri May 30 22:21:04 2014
@@ -49,7 +49,7 @@ std::string _object_error_category::mess
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;
}
Modified: llvm/trunk/lib/ProfileData/InstrProf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/InstrProf.cpp?rev=209960&r1=209959&r2=209960&view=diff
==============================================================================
--- llvm/trunk/lib/ProfileData/InstrProf.cpp (original)
+++ llvm/trunk/lib/ProfileData/InstrProf.cpp Fri May 30 22:21:04 2014
@@ -54,7 +54,7 @@ class InstrProfErrorCategoryType : publi
}
error_condition default_error_condition(int EV) const override {
if (EV == instrprof_error::success)
- return errc::success;
+ return error_condition();
return errc::invalid_argument;
}
};
Modified: llvm/trunk/lib/Support/LockFileManager.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/LockFileManager.cpp?rev=209960&r1=209959&r2=209960&view=diff
==============================================================================
--- llvm/trunk/lib/Support/LockFileManager.cpp (original)
+++ llvm/trunk/lib/Support/LockFileManager.cpp Fri May 30 22:21:04 2014
@@ -124,7 +124,7 @@ LockFileManager::LockFileManager(StringR
// 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) {
Modified: llvm/trunk/lib/Support/Unix/Program.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Program.inc?rev=209960&r1=209959&r2=209960&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Program.inc (original)
+++ llvm/trunk/lib/Support/Unix/Program.inc Fri May 30 22:21:04 2014
@@ -427,12 +427,12 @@ ProcessInfo sys::Wait(const ProcessInfo
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) {
Modified: llvm/trunk/tools/llvm-readobj/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/Error.cpp?rev=209960&r1=209959&r2=209960&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/Error.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/Error.cpp Fri May 30 22:21:04 2014
@@ -50,7 +50,7 @@ std::string _readobj_error_category::mes
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;
}
Modified: llvm/trunk/tools/obj2yaml/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/obj2yaml/Error.cpp?rev=209960&r1=209959&r2=209960&view=diff
==============================================================================
--- llvm/trunk/tools/obj2yaml/Error.cpp (original)
+++ llvm/trunk/tools/obj2yaml/Error.cpp Fri May 30 22:21:04 2014
@@ -42,7 +42,7 @@ std::string _obj2yaml_error_category::me
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;
}
More information about the llvm-commits
mailing list