[lld] r320543 - Remove unnecessary use of Repl.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 12 18:09:15 PST 2017


Author: rafael
Date: Tue Dec 12 18:09:14 2017
New Revision: 320543

URL: http://llvm.org/viewvc/llvm-project?rev=320543&view=rev
Log:
Remove unnecessary use of Repl.

This runs before ICF, so Sec->Repl == Sec.

Modified:
    lld/trunk/ELF/InputFiles.cpp

Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=320543&r1=320542&r2=320543&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Tue Dec 12 18:09:14 2017
@@ -605,10 +605,7 @@ InputSectionBase *ObjFile<ELFT>::getSect
     return nullptr;
   if (Index >= this->Sections.size())
     fatal(toString(this) + ": invalid section index: " + Twine(Index));
-
-  if (InputSectionBase *Sec = this->Sections[Index])
-    return Sec->Repl;
-  return nullptr;
+  return this->Sections[Index];
 }
 
 template <class ELFT> Symbol *ObjFile<ELFT>::createSymbol(const Elf_Sym *Sym) {




More information about the llvm-commits mailing list