summaryrefslogtreecommitdiff
path: root/lib/ReaderWriter/ELF/X86/X86ELFFile.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-03-24 21:31:36 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-03-24 21:31:36 +0000
commitfb911942f1434f3d1750f83f25f5e42c80e60638 (patch)
tree1678c4a4f0182e4029a86d135aa4a1b7d09e3c41 /lib/ReaderWriter/ELF/X86/X86ELFFile.h
Notes
Diffstat (limited to 'lib/ReaderWriter/ELF/X86/X86ELFFile.h')
-rw-r--r--lib/ReaderWriter/ELF/X86/X86ELFFile.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/lib/ReaderWriter/ELF/X86/X86ELFFile.h b/lib/ReaderWriter/ELF/X86/X86ELFFile.h
new file mode 100644
index 0000000000000..621c38c435054
--- /dev/null
+++ b/lib/ReaderWriter/ELF/X86/X86ELFFile.h
@@ -0,0 +1,41 @@
+//===- lib/ReaderWriter/ELF/X86/X86ELFFile.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_X86_ELF_FILE_H
+#define LLD_READER_WRITER_ELF_X86_X86_ELF_FILE_H
+
+#include "ELFReader.h"
+
+namespace lld {
+namespace elf {
+
+class X86LinkingContext;
+
+template <class ELFT> class X86ELFFile : public ELFFile<ELFT> {
+public:
+ X86ELFFile(std::unique_ptr<MemoryBuffer> mb, X86LinkingContext &ctx)
+ : ELFFile<ELFT>(std::move(mb), ctx) {}
+
+ static ErrorOr<std::unique_ptr<X86ELFFile>>
+ create(std::unique_ptr<MemoryBuffer> mb, X86LinkingContext &ctx) {
+ return std::unique_ptr<X86ELFFile<ELFT>>(
+ new X86ELFFile<ELFT>(std::move(mb), ctx));
+ }
+};
+
+template <class ELFT> class X86DynamicFile : public DynamicFile<ELFT> {
+public:
+ X86DynamicFile(const X86LinkingContext &context, StringRef name)
+ : DynamicFile<ELFT>(context, name) {}
+};
+
+} // elf
+} // lld
+
+#endif // LLD_READER_WRITER_ELF_X86_X86_ELF_FILE_H