//===- lib/ReaderWriter/ELF/HexagonELFReader.h ----------------------------===// // // The LLVM Linker // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLD_READER_WRITER_HEXAGON_ELF_READER_H #define LLD_READER_WRITER_HEXAGON_ELF_READER_H #include "ELFReader.h" #include "HexagonELFFile.h" namespace lld { namespace elf { typedef llvm::object::ELFType HexagonELFType; struct HexagonDynamicFileCreateELFTraits { typedef llvm::ErrorOr> result_type; template static result_type create(std::unique_ptr mb, HexagonLinkingContext &ctx) { return lld::elf::HexagonDynamicFile::create(std::move(mb), ctx); } }; struct HexagonELFFileCreateELFTraits { typedef llvm::ErrorOr> result_type; template static result_type create(std::unique_ptr mb, HexagonLinkingContext &ctx) { return lld::elf::HexagonELFFile::create(std::move(mb), ctx); } }; class HexagonELFObjectReader : public ELFObjectReader { public: HexagonELFObjectReader(HexagonLinkingContext &ctx) : ELFObjectReader(ctx, llvm::ELF::EM_HEXAGON) {} }; class HexagonELFDSOReader : public ELFDSOReader { public: HexagonELFDSOReader(HexagonLinkingContext &ctx) : ELFDSOReader(ctx, llvm::ELF::EM_HEXAGON) {} }; } // namespace elf } // namespace lld #endif // LLD_READER_WRITER_ELF_READER_H