aboutsummaryrefslogtreecommitdiff
path: root/lib/ReaderWriter/ELF/X86_64/X86_64ELFFile.h
blob: d43840a63e7e0d0bd51f821fb1b94f34455ed0db (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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