Remove redundant local variable.
authorRui Ueyama <ruiu@google.com>
Tue, 9 Aug 2016 01:35:39 +0000 (01:35 +0000)
committerRui Ueyama <ruiu@google.com>
Tue, 9 Aug 2016 01:35:39 +0000 (01:35 +0000)
llvm-svn: 278085

lld/ELF/Writer.cpp

index 8f316f7..efb29e4 100644 (file)
@@ -662,9 +662,6 @@ template <class ELFT> void Writer<ELFT>::createSections() {
 
 // 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>::finalizeSections() {
   // 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);
   }