diff options
Diffstat (limited to 'lib/ReaderWriter/ELF/X86_64/X86_64ELFFile.h')
-rw-r--r-- | lib/ReaderWriter/ELF/X86_64/X86_64ELFFile.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/lib/ReaderWriter/ELF/X86_64/X86_64ELFFile.h b/lib/ReaderWriter/ELF/X86_64/X86_64ELFFile.h new file mode 100644 index 000000000000..d43840a63e7e --- /dev/null +++ b/lib/ReaderWriter/ELF/X86_64/X86_64ELFFile.h @@ -0,0 +1,41 @@ +//===- lib/ReaderWriter/ELF/X86_64/X86_64ELFFile.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_X86_64_ELF_FILE_H +#define LLD_READER_WRITER_ELF_X86_64_ELF_FILE_H + +#include "ELFReader.h" + +namespace lld { +namespace elf { + +class X86_64LinkingContext; + +template <class ELFT> class X86_64ELFFile : public ELFFile<ELFT> { +public: + X86_64ELFFile(std::unique_ptr<MemoryBuffer> mb, X86_64LinkingContext &ctx) + : ELFFile<ELFT>(std::move(mb), ctx) {} + + static ErrorOr<std::unique_ptr<X86_64ELFFile>> + create(std::unique_ptr<MemoryBuffer> mb, X86_64LinkingContext &ctx) { + return std::unique_ptr<X86_64ELFFile<ELFT>>( + new X86_64ELFFile<ELFT>(std::move(mb), ctx)); + } +}; + +template <class ELFT> class X86_64DynamicFile : public DynamicFile<ELFT> { +public: + X86_64DynamicFile(const X86_64LinkingContext &context, StringRef name) + : DynamicFile<ELFT>(context, name) {} +}; + +} // elf +} // lld + +#endif // LLD_READER_WRITER_ELF_X86_64_ELF_FILE_H |