Simplify.

Because of the same reason as r316600, I don't think we need a guard
against empty relocations.

llvm-svn: 316710
This commit is contained in:
Rui Ueyama 2017-10-26 22:30:25 +00:00
parent 29dd40b38e
commit bfa84325ee
1 changed files with 1 additions and 3 deletions

View File

@ -511,9 +511,7 @@ void EhFrameSection<ELFT>::addSection(InputSectionBase *C) {
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>());