<p dir="ltr">Thanks!</p>
<div class="gmail_quote">On Feb 27, 2016 9:55 PM, "Rui Ueyama via llvm-commits" <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ruiu<br>
Date: Sat Feb 27 20:51:02 2016<br>
New Revision: 262166<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=262166&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=262166&view=rev</a><br>
Log:<br>
Remove dead code. This error type is for the old linker script reader.<br>
<br>
Modified:<br>
    lld/trunk/include/lld/Core/Error.h<br>
    lld/trunk/lib/Core/Error.cpp<br>
<br>
Modified: lld/trunk/include/lld/Core/Error.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/Error.h?rev=262166&r1=262165&r2=262166&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/Error.h?rev=262166&r1=262165&r2=262166&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/include/lld/Core/Error.h (original)<br>
+++ lld/trunk/include/lld/Core/Error.h Sat Feb 27 20:51:02 2016<br>
@@ -30,23 +30,6 @@ inline std::error_code make_error_code(Y<br>
   return std::error_code(static_cast<int>(e), YamlReaderCategory());<br>
 }<br>
<br>
-const std::error_category &LinkerScriptReaderCategory();<br>
-<br>
-enum class LinkerScriptReaderError {<br>
-  success = 0,<br>
-  parse_error,<br>
-  unknown_symbol_in_expr,<br>
-  unrecognized_function_in_expr,<br>
-  unknown_phdr_ids,<br>
-  extra_program_phdr,<br>
-  misplaced_program_phdr,<br>
-  program_phdr_wrong_phdrs,<br>
-};<br>
-<br>
-inline std::error_code make_error_code(LinkerScriptReaderError e) {<br>
-  return std::error_code(static_cast<int>(e), LinkerScriptReaderCategory());<br>
-}<br>
-<br>
 /// Creates an error_code object that has associated with it an arbitrary<br>
 /// error messsage.  The value() of the error_code will always be non-zero<br>
 /// but its value is meaningless. The messsage() will be (a copy of) the<br>
@@ -61,8 +44,6 @@ std::error_code make_dynamic_error_code(<br>
<br>
 namespace std {<br>
 template <> struct is_error_code_enum<lld::YamlReaderError> : std::true_type {};<br>
-template <><br>
-struct is_error_code_enum<lld::LinkerScriptReaderError> : std::true_type {};<br>
 }<br>
<br>
 #endif<br>
<br>
Modified: lld/trunk/lib/Core/Error.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/Error.cpp?rev=262166&r1=262165&r2=262166&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/Error.cpp?rev=262166&r1=262165&r2=262166&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/lib/Core/Error.cpp (original)<br>
+++ lld/trunk/lib/Core/Error.cpp Sat Feb 27 20:51:02 2016<br>
@@ -39,42 +39,6 @@ const std::error_category &lld::YamlRead<br>
   return o;<br>
 }<br>
<br>
-class _LinkerScriptReaderErrorCategory : public std::error_category {<br>
-public:<br>
-  const char *name() const LLVM_NOEXCEPT override {<br>
-    return "lld.linker-script.reader";<br>
-  }<br>
-<br>
-  std::string message(int ev) const override {<br>
-    switch (static_cast<LinkerScriptReaderError>(ev)) {<br>
-    case LinkerScriptReaderError::success:<br>
-      return "Success";<br>
-    case LinkerScriptReaderError::parse_error:<br>
-      return "Error parsing linker script";<br>
-    case LinkerScriptReaderError::unknown_symbol_in_expr:<br>
-      return "Unknown symbol found when evaluating linker script expression";<br>
-    case LinkerScriptReaderError::unrecognized_function_in_expr:<br>
-      return "Unrecognized function call when evaluating linker script "<br>
-             "expression";<br>
-    case LinkerScriptReaderError::unknown_phdr_ids:<br>
-      return "Unknown header identifiers (missing in PHDRS command) are used";<br>
-    case LinkerScriptReaderError::extra_program_phdr:<br>
-      return "Extra program header is found";<br>
-    case LinkerScriptReaderError::misplaced_program_phdr:<br>
-      return "Program header must precede load segments";<br>
-    case LinkerScriptReaderError::program_phdr_wrong_phdrs:<br>
-      return "Program header has invalid PHDRS attribute";<br>
-    }<br>
-    llvm_unreachable("An enumerator of LinkerScriptReaderError does not have a "<br>
-                     "message defined.");<br>
-  }<br>
-};<br>
-<br>
-const std::error_category &lld::LinkerScriptReaderCategory() {<br>
-  static _LinkerScriptReaderErrorCategory o;<br>
-  return o;<br>
-}<br>
-<br>
 namespace lld {<br>
<br>
 /// Temporary class to enable make_dynamic_error_code() until<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>