[lld] r338708 - [LLD][ELF] - Remove redundant code. NFC.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 2 05:20:36 PDT 2018
Author: grimar
Date: Thu Aug 2 05:20:36 2018
New Revision: 338708
URL: http://llvm.org/viewvc/llvm-project?rev=338708&view=rev
Log:
[LLD][ELF] - Remove redundant code. NFC.
Code was never executed with our test cases,
though it is valid and I think we can always run it.
This improves code coverage.
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=338708&r1=338707&r2=338708&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Thu Aug 2 05:20:36 2018
@@ -940,8 +940,7 @@ std::vector<const typename ELFT::Verdef
auto *CurVerdef = reinterpret_cast<const Elf_Verdef *>(Verdef);
Verdef += CurVerdef->vd_next;
unsigned VerdefIndex = CurVerdef->vd_ndx;
- if (Verdefs.size() <= VerdefIndex)
- Verdefs.resize(VerdefIndex + 1);
+ Verdefs.resize(VerdefIndex + 1);
Verdefs[VerdefIndex] = CurVerdef;
}
More information about the llvm-commits
mailing list