diff --git a/lld/lib/ReaderWriter/ELF/AArch64/AArch64RelocationHandler.h b/lld/lib/ReaderWriter/ELF/AArch64/AArch64RelocationHandler.h index 293602252b8f..7d5e552c2e81 100644 --- a/lld/lib/ReaderWriter/ELF/AArch64/AArch64RelocationHandler.h +++ b/lld/lib/ReaderWriter/ELF/AArch64/AArch64RelocationHandler.h @@ -10,14 +10,12 @@ #ifndef AARCH64_RELOCATION_HANDLER_H #define AARCH64_RELOCATION_HANDLER_H -#include "AArch64TargetHandler.h" +#include "lld/ReaderWriter/ELFLinkingContext.h" namespace lld { namespace elf { typedef llvm::object::ELFType AArch64ELFType; -template class AArch64TargetLayout; - class AArch64TargetRelocationHandler final : public TargetRelocationHandler { public: std::error_code applyRelocation(ELFWriter &, llvm::FileOutputBuffer &, diff --git a/lld/lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.h b/lld/lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.h index 227d68617bf9..b872ce4e62ed 100644 --- a/lld/lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.h +++ b/lld/lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.h @@ -10,10 +10,11 @@ #ifndef LLD_READER_WRITER_ELF_ARM_ARM_RELOCATION_HANDLER_H #define LLD_READER_WRITER_ELF_ARM_ARM_RELOCATION_HANDLER_H -#include "ARMTargetHandler.h" +#include "lld/ReaderWriter/ELFLinkingContext.h" namespace lld { namespace elf { + typedef llvm::object::ELFType ARMELFType; template class ARMTargetLayout; diff --git a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp index 45775666dccf..5f87660016c5 100644 --- a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp +++ b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp @@ -9,8 +9,9 @@ #include "HexagonLinkingContext.h" #include "HexagonRelocationFunctions.h" -#include "HexagonTargetHandler.h" #include "HexagonRelocationHandler.h" +#include "HexagonTargetHandler.h" +#include "lld/ReaderWriter/RelocationHelperFunctions.h" #include "llvm/Support/Endian.h" using namespace lld; diff --git a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.h b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.h index 084a5f303ca5..e09a9dbfe257 100644 --- a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.h +++ b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.h @@ -9,14 +9,14 @@ #ifndef LLD_READER_WRITER_ELF_HEXAGON_HEXAGON_RELOCATION_HANDLER_H #define LLD_READER_WRITER_ELF_HEXAGON_HEXAGON_RELOCATION_HANDLER_H -#include "HexagonSectionChunks.h" -#include "HexagonTargetHandler.h" -#include "lld/ReaderWriter/RelocationHelperFunctions.h" +#include "lld/ReaderWriter/ELFLinkingContext.h" namespace lld { namespace elf { - class HexagonTargetHandler; +template class HexagonTargetLayout; + +typedef llvm::object::ELFType HexagonELFType; class HexagonTargetRelocationHandler final : public TargetRelocationHandler { public: diff --git a/lld/lib/ReaderWriter/ELF/X86/X86RelocationHandler.h b/lld/lib/ReaderWriter/ELF/X86/X86RelocationHandler.h index f161cdd55983..3a9ad2215a59 100644 --- a/lld/lib/ReaderWriter/ELF/X86/X86RelocationHandler.h +++ b/lld/lib/ReaderWriter/ELF/X86/X86RelocationHandler.h @@ -10,7 +10,7 @@ #ifndef X86_X86_RELOCATION_HANDLER_H #define X86_X86_RELOCATION_HANDLER_H -#include "X86TargetHandler.h" +#include "lld/ReaderWriter/ELFLinkingContext.h" namespace lld { namespace elf { diff --git a/lld/lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.h b/lld/lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.h index 29eecddf28c1..355a02b1b25e 100644 --- a/lld/lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.h +++ b/lld/lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.h @@ -10,7 +10,7 @@ #ifndef X86_64_RELOCATION_HANDLER_H #define X86_64_RELOCATION_HANDLER_H -#include "X86_64TargetHandler.h" +#include "lld/ReaderWriter/ELFLinkingContext.h" namespace lld { namespace elf {