[lld] r278085 - Remove redundant local variable.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 8 18:35:40 PDT 2016


Author: ruiu
Date: Mon Aug  8 20:35:39 2016
New Revision: 278085

URL: http://llvm.org/viewvc/llvm-project?rev=278085&view=rev
Log:
Remove redundant local variable.

Modified:
    lld/trunk/ELF/Writer.cpp

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=278085&r1=278084&r2=278085&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Mon Aug  8 20:35:39 2016
@@ -662,9 +662,6 @@ template <class ELFT> void Writer<ELFT>:
 
 // Create output section objects and add them to OutputSections.
 template <class ELFT> void Writer<ELFT>::finalizeSections() {
-  // Create output sections for input object file sections.
-  std::vector<OutputSectionBase<ELFT> *> RegularSections = OutputSections;
-
   Out<ELFT>::Dynamic->PreInitArraySec = findSection(".preinit_array");
   Out<ELFT>::Dynamic->InitArraySec = findSection(".init_array");
   Out<ELFT>::Dynamic->FiniArraySec = findSection(".fini_array");
@@ -680,7 +677,7 @@ template <class ELFT> void Writer<ELFT>:
   // addresses of each section by section name. Add such symbols.
   if (!Config->Relocatable) {
     addStartEndSymbols();
-    for (OutputSectionBase<ELFT> *Sec : RegularSections)
+    for (OutputSectionBase<ELFT> *Sec : OutputSections)
       addStartStopSymbols(Sec);
   }
 




More information about the llvm-commits mailing list