//===- lib/ReaderWriter/ELF/DefaultTargetHandler.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_ELF_DEFAULT_TARGET_HANDLER_H #define LLD_READER_WRITER_ELF_DEFAULT_TARGET_HANDLER_H #include "DefaultLayout.h" #include "TargetHandler.h" #include "ELFReader.h" #include "DynamicLibraryWriter.h" #include "ExecutableWriter.h" #include "lld/ReaderWriter/ELFLinkingContext.h" #include "llvm/ADT/Triple.h" #include "llvm/Support/ELF.h" namespace lld { namespace elf { template class DefaultTargetHandler : public TargetHandler { public: DefaultTargetHandler(ELFLinkingContext &context) : TargetHandler(context) {} const TargetRelocationHandler &getRelocationHandler() const { llvm_unreachable("Target should provide implementation for function "); } virtual std::unique_ptr getObjReader(bool atomizeStrings) { return std::unique_ptr(new ELFObjectReader(atomizeStrings)); } virtual std::unique_ptr getDSOReader(bool useShlibUndefines) { return std::unique_ptr(new ELFDSOReader(useShlibUndefines)); } virtual std::unique_ptr getWriter() = 0; }; } // end namespace elf } // end namespace lld #endif