[lld] r262166 - Remove dead code. This error type is for the old linker script reader.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 28 06:58:13 PST 2016


Thanks!
On Feb 27, 2016 9:55 PM, "Rui Ueyama via llvm-commits" <
llvm-commits at lists.llvm.org> wrote:

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


More information about the llvm-commits mailing list