[lld] r286242 - Remove dead arguments. NFC.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 8 07:51:00 PST 2016


Author: rafael
Date: Tue Nov  8 09:51:00 2016
New Revision: 286242

URL: http://llvm.org/viewvc/llvm-project?rev=286242&view=rev
Log:
Remove dead arguments. NFC.

Modified:
    lld/trunk/ELF/InputFiles.cpp
    lld/trunk/ELF/InputFiles.h

Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=286242&r1=286241&r2=286242&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Tue Nov  8 09:51:00 2016
@@ -171,9 +171,8 @@ template <class ELFT> uint32_t elf::Obje
 template <class ELFT>
 void elf::ObjectFile<ELFT>::parse(DenseSet<CachedHashStringRef> &ComdatGroups) {
   // Read section and symbol tables.
-  ArrayRef<Elf_Shdr> 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<ELFT>::shouldMerge(
 
 template <class ELFT>
 void elf::ObjectFile<ELFT>::initializeSections(
-    DenseSet<CachedHashStringRef> &ComdatGroups,
-    ArrayRef<Elf_Shdr> ObjSections) {
+    DenseSet<CachedHashStringRef> &ComdatGroups) {
+  ArrayRef<Elf_Shdr> ObjSections = check(this->getObj().sections());
   const ELFFile<ELFT> &Obj = this->getObj();
   uint64_t Size = ObjSections.size();
   Sections.resize(Size);
@@ -422,8 +421,7 @@ elf::ObjectFile<ELFT>::createInputSectio
   return make<InputSection<ELFT>>(this, &Sec, Name);
 }
 
-template <class ELFT>
-void elf::ObjectFile<ELFT>::initializeSymbols(ArrayRef<Elf_Shdr> Sections) {
+template <class ELFT> void elf::ObjectFile<ELFT>::initializeSymbols() {
   SymbolBodies.reserve(this->Symbols.size());
   for (const Elf_Sym &Sym : this->Symbols)
     SymbolBodies.push_back(createSymbolBody(&Sym));

Modified: lld/trunk/ELF/InputFiles.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.h?rev=286242&r1=286241&r2=286242&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.h (original)
+++ lld/trunk/ELF/InputFiles.h Tue Nov  8 09:51:00 2016
@@ -178,9 +178,8 @@ public:
 
 private:
   void
-  initializeSections(llvm::DenseSet<llvm::CachedHashStringRef> &ComdatGroups,
-                     ArrayRef<Elf_Shdr> ObjSections);
-  void initializeSymbols(ArrayRef<Elf_Shdr> Sections);
+  initializeSections(llvm::DenseSet<llvm::CachedHashStringRef> &ComdatGroups);
+  void initializeSymbols();
   void initializeDwarfLine();
   InputSectionBase<ELFT> *getRelocTarget(const Elf_Shdr &Sec);
   InputSectionBase<ELFT> *createInputSection(const Elf_Shdr &Sec,




More information about the llvm-commits mailing list