diff options
| author | Rui Ueyama <ruiu@google.com> | 2015-04-14 04:53:57 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2015-04-14 04:53:57 +0000 |
| commit | 7bda84d25e7e9acf40715b76c332dc5d581b515a (patch) | |
| tree | bd99bb79ea8726a24faa31a09a7d9ba676f9a868 /lld/lib/ReaderWriter/ELF/ARM/ARMLinkingContext.h | |
| parent | acdee690c810a64610b1db689fc414bc16f63f98 (diff) | |
| download | bcm5719-llvm-7bda84d25e7e9acf40715b76c332dc5d581b515a.tar.gz bcm5719-llvm-7bda84d25e7e9acf40715b76c332dc5d581b515a.zip | |
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
Diffstat (limited to 'lld/lib/ReaderWriter/ELF/ARM/ARMLinkingContext.h')
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/ARM/ARMLinkingContext.h | 2 |
1 files changed, 1 insertions, 1 deletions
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; |

