summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/ELF
diff options
context:
space:
mode:
Diffstat (limited to 'lld/lib/ReaderWriter/ELF')
-rw-r--r--lld/lib/ReaderWriter/ELF/AArch64/AArch64RelocationHandler.cpp1
-rw-r--r--lld/lib/ReaderWriter/ELF/AArch64/AArch64TargetHandler.h3
-rw-r--r--lld/lib/ReaderWriter/ELF/ARM/ARMTargetHandler.h3
-rw-r--r--lld/lib/ReaderWriter/ELF/DefaultTargetHandler.h38
-rw-r--r--lld/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.h4
-rw-r--r--lld/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h3
-rw-r--r--lld/lib/ReaderWriter/ELF/X86/X86TargetHandler.h4
-rw-r--r--lld/lib/ReaderWriter/ELF/X86_64/X86_64TargetHandler.h4
8 files changed, 7 insertions, 53 deletions
diff --git a/lld/lib/ReaderWriter/ELF/AArch64/AArch64RelocationHandler.cpp b/lld/lib/ReaderWriter/ELF/AArch64/AArch64RelocationHandler.cpp
index 39d9d531274..b52296a54f9 100644
--- a/lld/lib/ReaderWriter/ELF/AArch64/AArch64RelocationHandler.cpp
+++ b/lld/lib/ReaderWriter/ELF/AArch64/AArch64RelocationHandler.cpp
@@ -17,6 +17,7 @@
using namespace lld;
using namespace lld::elf;
+using namespace llvm;
using namespace llvm::support::endian;
#define PAGE(X) ((X) & ~0x0FFFL)
diff --git a/lld/lib/ReaderWriter/ELF/AArch64/AArch64TargetHandler.h b/lld/lib/ReaderWriter/ELF/AArch64/AArch64TargetHandler.h
index 3f1f79d79bb..a4b92942b7b 100644
--- a/lld/lib/ReaderWriter/ELF/AArch64/AArch64TargetHandler.h
+++ b/lld/lib/ReaderWriter/ELF/AArch64/AArch64TargetHandler.h
@@ -13,7 +13,6 @@
#include "AArch64ELFFile.h"
#include "AArch64ELFReader.h"
#include "AArch64RelocationHandler.h"
-#include "DefaultTargetHandler.h"
#include "TargetLayout.h"
#include "lld/Core/Simple.h"
@@ -26,7 +25,7 @@ public:
AArch64TargetLayout(AArch64LinkingContext &ctx) : TargetLayout<ELFT>(ctx) {}
};
-class AArch64TargetHandler final : public DefaultTargetHandler<AArch64ELFType> {
+class AArch64TargetHandler final : public TargetHandler<AArch64ELFType> {
public:
AArch64TargetHandler(AArch64LinkingContext &ctx);
diff --git a/lld/lib/ReaderWriter/ELF/ARM/ARMTargetHandler.h b/lld/lib/ReaderWriter/ELF/ARM/ARMTargetHandler.h
index 2ff8dc01592..4624af21ec5 100644
--- a/lld/lib/ReaderWriter/ELF/ARM/ARMTargetHandler.h
+++ b/lld/lib/ReaderWriter/ELF/ARM/ARMTargetHandler.h
@@ -13,7 +13,6 @@
#include "ARMELFFile.h"
#include "ARMELFReader.h"
#include "ARMRelocationHandler.h"
-#include "DefaultTargetHandler.h"
#include "TargetLayout.h"
#include "llvm/ADT/Optional.h"
@@ -58,7 +57,7 @@ private:
llvm::Optional<uint64_t> _tpOff;
};
-class ARMTargetHandler final : public DefaultTargetHandler<ARMELFType> {
+class ARMTargetHandler final : public TargetHandler<ARMELFType> {
public:
ARMTargetHandler(ARMLinkingContext &ctx);
diff --git a/lld/lib/ReaderWriter/ELF/DefaultTargetHandler.h b/lld/lib/ReaderWriter/ELF/DefaultTargetHandler.h
deleted file mode 100644
index 16668f2df61..00000000000
--- a/lld/lib/ReaderWriter/ELF/DefaultTargetHandler.h
+++ /dev/null
@@ -1,38 +0,0 @@
-//===- 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 "DynamicLibraryWriter.h"
-#include "ELFReader.h"
-#include "ExecutableWriter.h"
-#include "TargetHandler.h"
-#include "lld/ReaderWriter/ELFLinkingContext.h"
-#include "llvm/ADT/Triple.h"
-#include "llvm/Support/ELF.h"
-
-namespace lld {
-namespace elf {
-template <class ELFT>
-class DefaultTargetHandler : public TargetHandler<ELFT> {
-public:
- const TargetRelocationHandler &getRelocationHandler() const = 0;
-
- virtual std::unique_ptr<Reader> getObjReader() = 0;
-
- virtual std::unique_ptr<Reader> getDSOReader() = 0;
-
- virtual std::unique_ptr<Writer> getWriter() = 0;
-};
-
-} // end namespace elf
-} // end namespace lld
-#endif
diff --git a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.h b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.h
index 11360588bbb..ab2973b73d2 100644
--- a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.h
+++ b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.h
@@ -10,7 +10,6 @@
#ifndef HEXAGON_TARGET_HANDLER_H
#define HEXAGON_TARGET_HANDLER_H
-#include "DefaultTargetHandler.h"
#include "HexagonELFReader.h"
#include "HexagonExecutableAtoms.h"
#include "HexagonRelocationHandler.h"
@@ -97,8 +96,7 @@ private:
};
/// \brief TargetHandler for Hexagon
-class HexagonTargetHandler final :
- public DefaultTargetHandler<HexagonELFType> {
+class HexagonTargetHandler final : public TargetHandler<HexagonELFType> {
public:
HexagonTargetHandler(HexagonLinkingContext &targetInfo);
diff --git a/lld/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h b/lld/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h
index 5e52b17fcdb..75ec6d4fa19 100644
--- a/lld/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h
+++ b/lld/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h
@@ -9,7 +9,6 @@
#ifndef LLD_READER_WRITER_ELF_MIPS_MIPS_TARGET_HANDLER_H
#define LLD_READER_WRITER_ELF_MIPS_MIPS_TARGET_HANDLER_H
-#include "DefaultTargetHandler.h"
#include "MipsDynamicLibraryWriter.h"
#include "MipsELFReader.h"
#include "MipsExecutableWriter.h"
@@ -101,7 +100,7 @@ public:
/// \brief TargetHandler for Mips
template <class ELFT>
-class MipsTargetHandler final : public DefaultTargetHandler<ELFT> {
+class MipsTargetHandler final : public TargetHandler<ELFT> {
public:
MipsTargetHandler(MipsLinkingContext &ctx)
: _ctx(ctx), _runtimeFile(new MipsRuntimeFile<ELFT>(ctx)),
diff --git a/lld/lib/ReaderWriter/ELF/X86/X86TargetHandler.h b/lld/lib/ReaderWriter/ELF/X86/X86TargetHandler.h
index f3530aff552..e4d212e572e 100644
--- a/lld/lib/ReaderWriter/ELF/X86/X86TargetHandler.h
+++ b/lld/lib/ReaderWriter/ELF/X86/X86TargetHandler.h
@@ -10,7 +10,6 @@
#ifndef LLD_READER_WRITER_ELF_X86_TARGET_HANDLER_H
#define LLD_READER_WRITER_ELF_X86_TARGET_HANDLER_H
-#include "DefaultTargetHandler.h"
#include "TargetLayout.h"
#include "X86ELFFile.h"
#include "X86ELFReader.h"
@@ -26,8 +25,7 @@ public:
X86TargetLayout(X86LinkingContext &ctx) : TargetLayout<ELFT>(ctx) {}
};
-class X86TargetHandler final
- : public DefaultTargetHandler<X86ELFType> {
+class X86TargetHandler final : public TargetHandler<X86ELFType> {
public:
X86TargetHandler(X86LinkingContext &ctx);
diff --git a/lld/lib/ReaderWriter/ELF/X86_64/X86_64TargetHandler.h b/lld/lib/ReaderWriter/ELF/X86_64/X86_64TargetHandler.h
index 804867c5b34..f5bb0b4c60c 100644
--- a/lld/lib/ReaderWriter/ELF/X86_64/X86_64TargetHandler.h
+++ b/lld/lib/ReaderWriter/ELF/X86_64/X86_64TargetHandler.h
@@ -10,7 +10,6 @@
#ifndef LLD_READER_WRITER_ELF_X86_64_X86_64_TARGET_HANDLER_H
#define LLD_READER_WRITER_ELF_X86_64_X86_64_TARGET_HANDLER_H
-#include "DefaultTargetHandler.h"
#include "TargetLayout.h"
#include "X86_64ELFFile.h"
#include "X86_64ELFReader.h"
@@ -30,8 +29,7 @@ public:
}
};
-class X86_64TargetHandler
- : public DefaultTargetHandler<X86_64ELFType> {
+class X86_64TargetHandler : public TargetHandler<X86_64ELFType> {
public:
X86_64TargetHandler(X86_64LinkingContext &ctx);
OpenPOWER on IntegriCloud