[lld] r316710 - Simplify.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 26 15:30:25 PDT 2017
Author: ruiu
Date: Thu Oct 26 15:30:25 2017
New Revision: 316710
URL: http://llvm.org/viewvc/llvm-project?rev=316710&view=rev
Log:
Simplify.
Because of the same reason as r316600, I don't think we need a guard
against empty relocations.
Modified:
lld/trunk/ELF/SyntheticSections.cpp
Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=316710&r1=316709&r2=316710&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Thu Oct 26 15:30:25 2017
@@ -511,9 +511,7 @@ void EhFrameSection<ELFT>::addSection(In
if (Sec->Pieces.empty())
return;
- if (Sec->NumRelocations == 0)
- addSectionAux(Sec, makeArrayRef<Elf_Rela>(nullptr, nullptr));
- else if (Sec->AreRelocsRela)
+ if (Sec->AreRelocsRela)
addSectionAux(Sec, Sec->template relas<ELFT>());
else
addSectionAux(Sec, Sec->template rels<ELFT>());
More information about the llvm-commits
mailing list