From 73c3a36b9f5036f4e497035193765c465d1b9ca2 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 8 Nov 2016 15:51:00 +0000 Subject: [PATCH] Remove dead arguments. NFC. llvm-svn: 286242 --- lld/ELF/InputFiles.cpp | 12 +++++------- lld/ELF/InputFiles.h | 5 ++--- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index 3654403..bedc279 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -171,9 +171,8 @@ template uint32_t elf::ObjectFile::getMipsGp0() const { template void elf::ObjectFile::parse(DenseSet &ComdatGroups) { // Read section and symbol tables. - ArrayRef ObjSections = check(this->getObj().sections()); - initializeSections(ComdatGroups, ObjSections); - initializeSymbols(ObjSections); + initializeSections(ComdatGroups); + initializeSymbols(); } // Sections with SHT_GROUP and comdat bits define comdat section groups. @@ -257,8 +256,8 @@ bool elf::ObjectFile::shouldMerge(const Elf_Shdr &Sec) { template void elf::ObjectFile::initializeSections( - DenseSet &ComdatGroups, - ArrayRef ObjSections) { + DenseSet &ComdatGroups) { + ArrayRef ObjSections = check(this->getObj().sections()); const ELFFile &Obj = this->getObj(); uint64_t Size = ObjSections.size(); Sections.resize(Size); @@ -422,8 +421,7 @@ elf::ObjectFile::createInputSection(const Elf_Shdr &Sec, return make>(this, &Sec, Name); } -template -void elf::ObjectFile::initializeSymbols(ArrayRef Sections) { +template void elf::ObjectFile::initializeSymbols() { SymbolBodies.reserve(this->Symbols.size()); for (const Elf_Sym &Sym : this->Symbols) SymbolBodies.push_back(createSymbolBody(&Sym)); diff --git a/lld/ELF/InputFiles.h b/lld/ELF/InputFiles.h index 63f9fff..97ee97e 100644 --- a/lld/ELF/InputFiles.h +++ b/lld/ELF/InputFiles.h @@ -178,9 +178,8 @@ public: private: void - initializeSections(llvm::DenseSet &ComdatGroups, - ArrayRef ObjSections); - void initializeSymbols(ArrayRef Sections); + initializeSections(llvm::DenseSet &ComdatGroups); + void initializeSymbols(); void initializeDwarfLine(); InputSectionBase *getRelocTarget(const Elf_Shdr &Sec); InputSectionBase *createInputSection(const Elf_Shdr &Sec, -- 2.7.4