Use ELFT instead of ELFFile<ELFT>.
llvm-svn: 263510
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index f0e16be..a8b1f9b 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -32,13 +32,13 @@
// The writer writes a SymbolTable result to a file.
template <class ELFT> class Writer {
public:
- typedef typename ELFFile<ELFT>::uintX_t uintX_t;
- typedef typename ELFFile<ELFT>::Elf_Shdr Elf_Shdr;
- typedef typename ELFFile<ELFT>::Elf_Ehdr Elf_Ehdr;
- typedef typename ELFFile<ELFT>::Elf_Phdr Elf_Phdr;
- typedef typename ELFFile<ELFT>::Elf_Sym Elf_Sym;
- typedef typename ELFFile<ELFT>::Elf_Sym_Range Elf_Sym_Range;
- typedef typename ELFFile<ELFT>::Elf_Rela Elf_Rela;
+ typedef typename ELFT::uint uintX_t;
+ typedef typename ELFT::Shdr Elf_Shdr;
+ typedef typename ELFT::Ehdr Elf_Ehdr;
+ typedef typename ELFT::Phdr Elf_Phdr;
+ typedef typename ELFT::Sym Elf_Sym;
+ typedef typename ELFT::SymRange Elf_Sym_Range;
+ typedef typename ELFT::Rela Elf_Rela;
Writer(SymbolTable<ELFT> &S) : Symtab(S) {}
void run();
@@ -123,7 +123,7 @@
} // anonymous namespace
template <class ELFT> void elf::writeResult(SymbolTable<ELFT> *Symtab) {
- typedef typename ELFFile<ELFT>::uintX_t uintX_t;
+ typedef typename ELFT::uint uintX_t;
// Create singleton output sections.
DynamicSection<ELFT> Dynamic(*Symtab);
@@ -515,7 +515,7 @@
template <class ELFT>
static bool shouldKeepInSymtab(const elf::ObjectFile<ELFT> &File,
StringRef SymName,
- const typename ELFFile<ELFT>::Elf_Sym &Sym) {
+ const typename ELFT::Sym &Sym) {
if (Sym.getType() == STT_FILE)
return false;
@@ -610,7 +610,7 @@
template <class ELFT>
static bool compareSections(OutputSectionBase<ELFT> *A,
OutputSectionBase<ELFT> *B) {
- typedef typename ELFFile<ELFT>::uintX_t uintX_t;
+ typedef typename ELFT::uint uintX_t;
int Comp = Script->compareSections(A->getName(), B->getName());
if (Comp != 0)
@@ -825,8 +825,8 @@
// linker scripts.
namespace {
template <class ELFT> class OutputSectionFactory {
- typedef typename ELFFile<ELFT>::Elf_Shdr Elf_Shdr;
- typedef typename ELFFile<ELFT>::uintX_t uintX_t;
+ typedef typename ELFT::Shdr Elf_Shdr;
+ typedef typename ELFT::uint uintX_t;
public:
std::pair<OutputSectionBase<ELFT> *, bool> create(InputSectionBase<ELFT> *C,
@@ -1424,8 +1424,7 @@
return V;
}
-template <class ELFT>
-static typename ELFFile<ELFT>::uintX_t getEntryAddr() {
+template <class ELFT> static typename ELFT::uint getEntryAddr() {
if (SymbolBody *B = Config->EntrySym)
return B->repl().getVA<ELFT>();
if (Config->EntryAddr != uint64_t(-1))