[lld] r210913 - Remove unused and odd code.

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


Author: rafael
Date: Fri Jun 13 10:36:45 2014
New Revision: 210913

URL: http://llvm.org/viewvc/llvm-project?rev=210913&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 NativeReaderError::file_malformed to
std::errc::invalid_argument.

Modified:
    lld/trunk/lib/Core/Error.cpp

Modified: lld/trunk/lib/Core/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/Error.cpp?rev=210913&r1=210912&r2=210913&view=diff
==============================================================================
--- lld/trunk/lib/Core/Error.cpp (original)
+++ lld/trunk/lib/Core/Error.cpp Fri Jun 13 10:36:45 2014
@@ -40,13 +40,6 @@ public:
     llvm_unreachable("An enumerator of NativeReaderError does not have a "
                      "message defined.");
   }
-
-  std::error_condition
-  default_error_condition(int ev) const LLVM_NOEXCEPT override {
-    if (NativeReaderError(ev) == NativeReaderError::success)
-      return std::error_condition();
-    return std::errc::invalid_argument;
-  }
 };
 
 const std::error_category &lld::native_reader_category() {
@@ -70,13 +63,6 @@ public:
     llvm_unreachable("An enumerator of YamlReaderError does not have a "
                      "message defined.");
   }
-
-  std::error_condition
-  default_error_condition(int ev) const LLVM_NOEXCEPT override {
-    if (YamlReaderError(ev) == YamlReaderError::success)
-      return std::error_condition();
-    return std::errc::invalid_argument;
-  }
 };
 
 const std::error_category &lld::YamlReaderCategory() {
@@ -100,14 +86,6 @@ public:
         "An enumerator of LinkerScriptReaderError does not have a "
         "message defined.");
   }
-
-  std::error_condition
-  default_error_condition(int ev) const LLVM_NOEXCEPT override {
-    LinkerScriptReaderError e = LinkerScriptReaderError(ev);
-    if (e == LinkerScriptReaderError::success)
-      return std::error_condition();
-    return std::errc::invalid_argument;
-  }
 };
 
 const std::error_category &lld::LinkerScriptReaderCategory() {
@@ -127,13 +105,6 @@ public:
     llvm_unreachable("An enumerator of InputGraphError does not have a "
                      "message defined.");
   }
-
-  std::error_condition
-  default_error_condition(int ev) const LLVM_NOEXCEPT override {
-    if (InputGraphError(ev) == InputGraphError::success)
-      return std::error_condition();
-    return std::errc::invalid_argument;
-  }
 };
 
 const std::error_category &lld::InputGraphErrorCategory() {
@@ -156,13 +127,6 @@ public:
     llvm_unreachable("An enumerator of ReaderError does not have a "
                      "message defined.");
   }
-
-  std::error_condition
-  default_error_condition(int ev) const LLVM_NOEXCEPT override {
-    if (ReaderError(ev) == ReaderError::success)
-      return std::error_condition();
-    return std::errc::invalid_argument;
-  }
 };
 
 const std::error_category &lld::ReaderErrorCategory() {





More information about the llvm-commits mailing list