From 7bda84d25e7e9acf40715b76c332dc5d581b515a Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Tue, 14 Apr 2015 04:53:57 +0000 Subject: ELF: Remove ELFT and LinkingContext template parameters from ELFReader. Previously, ELFReader takes three template arguments: EFLT, LinkingContextT and FileT. FileT is itself templated. So it was a bit complicated. Maybe too much. Most architectures don't actually need to be parameterized for ELFT. For example, x86 is always ELF32LE and x86-64 is ELF64LE. However, because ELFReader requires a ELFT argument, we needed to parameterize a class even if not needed. This patch removes the parameter from the class. So now we can de-templatize such classes (I didn't do that in this patch, though). This patch also removes ContextT parameter since it didn't have to be passed as a template argument. llvm-svn: 234853 --- lld/lib/ReaderWriter/ELF/ARM/ARMLinkingContext.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lld/lib/ReaderWriter/ELF/ARM/ARMLinkingContext.h') diff --git a/lld/lib/ReaderWriter/ELF/ARM/ARMLinkingContext.h b/lld/lib/ReaderWriter/ELF/ARM/ARMLinkingContext.h index 5540b730add..a354c2fc415 100644 --- a/lld/lib/ReaderWriter/ELF/ARM/ARMLinkingContext.h +++ b/lld/lib/ReaderWriter/ELF/ARM/ARMLinkingContext.h @@ -19,7 +19,7 @@ namespace elf { class ARMLinkingContext final : public ELFLinkingContext { public: - static const int machine = llvm::ELF::EM_ARM; + int getMachineType() const override { return llvm::ELF::EM_ARM; } ARMLinkingContext(llvm::Triple); void addPasses(PassManager &) override; -- cgit v1.2.3