[llvm] r210912 - Remove unused and odd code.

Rafael Espindola rafael.espindola at gmail.com
Fri Jun 13 08:36:17 PDT 2014


Author: rafael
Date: Fri Jun 13 10:36:17 2014
New Revision: 210912

URL: http://llvm.org/viewvc/llvm-project?rev=210912&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/Object/Error.cpp
    llvm/trunk/lib/ProfileData/InstrProf.cpp
    llvm/trunk/tools/llvm-readobj/Error.cpp
    llvm/trunk/tools/obj2yaml/Error.cpp

Modified: llvm/trunk/lib/Object/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/Error.cpp?rev=210912&r1=210911&r2=210912&view=diff
==============================================================================
--- llvm/trunk/lib/Object/Error.cpp (original)
+++ llvm/trunk/lib/Object/Error.cpp Fri Jun 13 10:36:17 2014
@@ -22,8 +22,6 @@ class _object_error_category : public st
 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::mess
                    "defined.");
 }
 
-std::error_condition
-_object_error_category::default_error_condition(int EV) const {
-  if (static_cast<object_error>(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;

Modified: llvm/trunk/lib/ProfileData/InstrProf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/InstrProf.cpp?rev=210912&r1=210911&r2=210912&view=diff
==============================================================================
--- llvm/trunk/lib/ProfileData/InstrProf.cpp (original)
+++ llvm/trunk/lib/ProfileData/InstrProf.cpp Fri Jun 13 10:36:17 2014
@@ -52,12 +52,6 @@ class InstrProfErrorCategoryType : publi
     }
     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<instrprof_error>(EV) == instrprof_error::success)
-      return std::error_condition();
-    return std::errc::invalid_argument;
-  }
 };
 }
 

Modified: llvm/trunk/tools/llvm-readobj/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/Error.cpp?rev=210912&r1=210911&r2=210912&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/Error.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/Error.cpp Fri Jun 13 10:36:17 2014
@@ -21,8 +21,6 @@ class _readobj_error_category : public s
 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::mes
                    "defined.");
 }
 
-std::error_condition
-_readobj_error_category::default_error_condition(int EV) const {
-  if (static_cast<readobj_error>(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;

Modified: llvm/trunk/tools/obj2yaml/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/obj2yaml/Error.cpp?rev=210912&r1=210911&r2=210912&view=diff
==============================================================================
--- llvm/trunk/tools/obj2yaml/Error.cpp (original)
+++ llvm/trunk/tools/obj2yaml/Error.cpp Fri Jun 13 10:36:17 2014
@@ -17,8 +17,6 @@ class _obj2yaml_error_category : public
 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::me
                    "defined.");
 }
 
-std::error_condition
-_obj2yaml_error_category::default_error_condition(int ev) const {
-  if (static_cast<obj2yaml_error>(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;





More information about the llvm-commits mailing list