From 54f199797923764acc7a5d49f6523a887babfa9e Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 13 Jun 2014 15:36:17 +0000 Subject: [PATCH] Remove unused and odd code. This code was never being used and any use of it would look fairly strange. For example, it would try to map a object_error::parse_failed to std::errc::invalid_argument. llvm-svn: 210912 --- llvm/lib/Object/Error.cpp | 9 --------- llvm/lib/ProfileData/InstrProf.cpp | 6 ------ llvm/tools/llvm-readobj/Error.cpp | 9 --------- llvm/tools/obj2yaml/Error.cpp | 9 --------- 4 files changed, 33 deletions(-) diff --git a/llvm/lib/Object/Error.cpp b/llvm/lib/Object/Error.cpp index 0a29cac6c4e5..9d252697ae52 100644 --- a/llvm/lib/Object/Error.cpp +++ b/llvm/lib/Object/Error.cpp @@ -22,8 +22,6 @@ class _object_error_category : public std::error_category { public: const char* name() const LLVM_NOEXCEPT override; std::string message(int ev) const override; - std::error_condition - default_error_condition(int ev) const LLVM_NOEXCEPT override; }; } @@ -48,13 +46,6 @@ std::string _object_error_category::message(int EV) const { "defined."); } -std::error_condition -_object_error_category::default_error_condition(int EV) const { - if (static_cast(EV) == object_error::success) - return std::error_condition(); - return std::errc::invalid_argument; -} - const std::error_category &object::object_category() { static _object_error_category o; return o; diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp index 628edfb86cd9..012122272067 100644 --- a/llvm/lib/ProfileData/InstrProf.cpp +++ b/llvm/lib/ProfileData/InstrProf.cpp @@ -52,12 +52,6 @@ class InstrProfErrorCategoryType : public std::error_category { } llvm_unreachable("A value of instrprof_error has no message."); } - std::error_condition - default_error_condition(int EV) const LLVM_NOEXCEPT override { - if (static_cast(EV) == instrprof_error::success) - return std::error_condition(); - return std::errc::invalid_argument; - } }; } diff --git a/llvm/tools/llvm-readobj/Error.cpp b/llvm/tools/llvm-readobj/Error.cpp index 4245e8d561a3..a078f5c095c7 100644 --- a/llvm/tools/llvm-readobj/Error.cpp +++ b/llvm/tools/llvm-readobj/Error.cpp @@ -21,8 +21,6 @@ class _readobj_error_category : public std::error_category { public: const char* name() const LLVM_NOEXCEPT override; std::string message(int ev) const override; - std::error_condition - default_error_condition(int ev) const LLVM_NOEXCEPT override; }; } // namespace @@ -48,13 +46,6 @@ std::string _readobj_error_category::message(int EV) const { "defined."); } -std::error_condition -_readobj_error_category::default_error_condition(int EV) const { - if (static_cast(EV) == readobj_error::success) - return std::error_condition(); - return std::errc::invalid_argument; -} - namespace llvm { const std::error_category &readobj_category() { static _readobj_error_category o; diff --git a/llvm/tools/obj2yaml/Error.cpp b/llvm/tools/obj2yaml/Error.cpp index 5b07b9cda8d6..00741287a649 100644 --- a/llvm/tools/obj2yaml/Error.cpp +++ b/llvm/tools/obj2yaml/Error.cpp @@ -17,8 +17,6 @@ class _obj2yaml_error_category : public std::error_category { public: const char *name() const LLVM_NOEXCEPT override; std::string message(int ev) const override; - std::error_condition - default_error_condition(int ev) const LLVM_NOEXCEPT override; }; } // namespace @@ -39,13 +37,6 @@ std::string _obj2yaml_error_category::message(int ev) const { "defined."); } -std::error_condition -_obj2yaml_error_category::default_error_condition(int ev) const { - if (static_cast(ev) == obj2yaml_error::success) - return std::error_condition(); - return std::errc::invalid_argument; -} - namespace llvm { const std::error_category &obj2yaml_category() { static _obj2yaml_error_category o;