Remove unnecessary use of Repl.

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

llvm-svn: 320543
This commit is contained in:
Rafael Espindola
2017-12-13 02:09:14 +00:00
parent fd901ccdda
commit cee2933408

View File

@@ -605,10 +605,7 @@ InputSectionBase *ObjFile<ELFT>::getSection(uint32_t Index) const {
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) {