[lld] r328605 - Remove extraneous local variable. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 26 19:53:08 PDT 2018
Author: ruiu
Date: Mon Mar 26 19:53:08 2018
New Revision: 328605
URL: http://llvm.org/viewvc/llvm-project?rev=328605&view=rev
Log:
Remove extraneous local variable. NFC.
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=328605&r1=328604&r2=328605&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Mon Mar 26 19:53:08 2018
@@ -547,20 +547,18 @@ InputSectionBase *ObjFile<ELFT>::createI
this->Sections[Sec.sh_info] = Target;
}
- size_t NumRelocations;
if (Sec.sh_type == SHT_RELA) {
ArrayRef<Elf_Rela> Rels = CHECK(this->getObj().relas(&Sec), this);
Target->FirstRelocation = Rels.begin();
- NumRelocations = Rels.size();
+ Target->NumRelocations = Rels.size();
Target->AreRelocsRela = true;
} else {
ArrayRef<Elf_Rel> Rels = CHECK(this->getObj().rels(&Sec), this);
Target->FirstRelocation = Rels.begin();
- NumRelocations = Rels.size();
+ Target->NumRelocations = Rels.size();
Target->AreRelocsRela = false;
}
- assert(isUInt<31>(NumRelocations));
- Target->NumRelocations = NumRelocations;
+ assert(isUInt<31>(Target->NumRelocations));
// Relocation sections processed by the linker are usually removed
// from the output, so returning `nullptr` for the normal case.
More information about the llvm-commits
mailing list