diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-12 01:29:42 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-12 01:29:42 +0000 |
commit | 173d7ff83300ece5cc18049cf5c909c1e8d179d9 (patch) | |
tree | fb50c261a9b8c1ee2f480fe5acf4b68e10f817fc | |
parent | 5ac7ab395a4a2954d2c5aefa75f2affc859641cc (diff) | |
download | llvm-173d7ff83300ece5cc18049cf5c909c1e8d179d9.tar.gz llvm-173d7ff83300ece5cc18049cf5c909c1e8d179d9.tar.bz2 llvm-173d7ff83300ece5cc18049cf5c909c1e8d179d9.tar.xz |
Don't import error_condition into the llvm namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210731 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Support/system_error.h | 1 | ||||
-rw-r--r-- | lib/Object/Error.cpp | 8 | ||||
-rw-r--r-- | lib/ProfileData/InstrProf.cpp | 5 | ||||
-rw-r--r-- | tools/llvm-readobj/Error.cpp | 8 | ||||
-rw-r--r-- | tools/obj2yaml/Error.cpp | 7 |
5 files changed, 17 insertions, 12 deletions
diff --git a/include/llvm/Support/system_error.h b/include/llvm/Support/system_error.h index ad2c99c25c..83645173b9 100644 --- a/include/llvm/Support/system_error.h +++ b/include/llvm/Support/system_error.h @@ -21,7 +21,6 @@ using std::error_code; using std::generic_category; using std::error_category; using std::make_error_code; -using std::error_condition; } #endif diff --git a/lib/Object/Error.cpp b/lib/Object/Error.cpp index a373cff195..39d765f884 100644 --- a/lib/Object/Error.cpp +++ b/lib/Object/Error.cpp @@ -22,7 +22,8 @@ class _object_error_category : public error_category { public: const char* name() const LLVM_NOEXCEPT override; std::string message(int ev) const override; - error_condition default_error_condition(int ev) const LLVM_NOEXCEPT override; + std::error_condition + default_error_condition(int ev) const LLVM_NOEXCEPT override; }; } @@ -47,9 +48,10 @@ std::string _object_error_category::message(int EV) const { "defined."); } -error_condition _object_error_category::default_error_condition(int EV) const { +std::error_condition +_object_error_category::default_error_condition(int EV) const { if (static_cast<object_error>(EV) == object_error::success) - return error_condition(); + return std::error_condition(); return std::errc::invalid_argument; } diff --git a/lib/ProfileData/InstrProf.cpp b/lib/ProfileData/InstrProf.cpp index eed517df05..88ae7582cc 100644 --- a/lib/ProfileData/InstrProf.cpp +++ b/lib/ProfileData/InstrProf.cpp @@ -52,9 +52,10 @@ class InstrProfErrorCategoryType : public error_category { } llvm_unreachable("A value of instrprof_error has no message."); } - error_condition default_error_condition(int EV) const LLVM_NOEXCEPT override { + std::error_condition + default_error_condition(int EV) const LLVM_NOEXCEPT override { if (static_cast<instrprof_error>(EV) == instrprof_error::success) - return error_condition(); + return std::error_condition(); return std::errc::invalid_argument; } }; diff --git a/tools/llvm-readobj/Error.cpp b/tools/llvm-readobj/Error.cpp index a276fcedb8..35e0a48fda 100644 --- a/tools/llvm-readobj/Error.cpp +++ b/tools/llvm-readobj/Error.cpp @@ -21,7 +21,8 @@ class _readobj_error_category : public error_category { public: const char* name() const LLVM_NOEXCEPT override; std::string message(int ev) const override; - error_condition default_error_condition(int ev) const LLVM_NOEXCEPT override; + std::error_condition + default_error_condition(int ev) const LLVM_NOEXCEPT override; }; } // namespace @@ -47,9 +48,10 @@ std::string _readobj_error_category::message(int EV) const { "defined."); } -error_condition _readobj_error_category::default_error_condition(int EV) const { +std::error_condition +_readobj_error_category::default_error_condition(int EV) const { if (static_cast<readobj_error>(EV) == readobj_error::success) - return error_condition(); + return std::error_condition(); return std::errc::invalid_argument; } diff --git a/tools/obj2yaml/Error.cpp b/tools/obj2yaml/Error.cpp index ab615ee193..3034e08951 100644 --- a/tools/obj2yaml/Error.cpp +++ b/tools/obj2yaml/Error.cpp @@ -17,7 +17,8 @@ class _obj2yaml_error_category : public error_category { public: const char *name() const LLVM_NOEXCEPT override; std::string message(int ev) const override; - error_condition default_error_condition(int ev) const LLVM_NOEXCEPT override; + std::error_condition + default_error_condition(int ev) const LLVM_NOEXCEPT override; }; } // namespace @@ -38,10 +39,10 @@ std::string _obj2yaml_error_category::message(int ev) const { "defined."); } -error_condition +std::error_condition _obj2yaml_error_category::default_error_condition(int ev) const { if (static_cast<obj2yaml_error>(ev) == obj2yaml_error::success) - return error_condition(); + return std::error_condition(); return std::errc::invalid_argument; } |