diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2017-12-13 02:09:14 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2017-12-13 02:09:14 +0000 |
commit | cee29334087f97aa0b0e134fc6f9a5a2f8e8555c (patch) | |
tree | 78e84f5f920097df8681ab7e447e241022f200ec | |
parent | fd901ccdda44b0690ea06cb7212e8f4598361ddc (diff) | |
download | bcm5719-llvm-cee29334087f97aa0b0e134fc6f9a5a2f8e8555c.tar.gz bcm5719-llvm-cee29334087f97aa0b0e134fc6f9a5a2f8e8555c.zip |
Remove unnecessary use of Repl.
This runs before ICF, so Sec->Repl == Sec.
llvm-svn: 320543
-rw-r--r-- | lld/ELF/InputFiles.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index 4f484076561..d6007674be4 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -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) { |