forked from OSchip/llvm-project
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:
parent
29dd40b38e
commit
bfa84325ee
|
@ -511,9 +511,7 @@ void EhFrameSection<ELFT>::addSection(InputSectionBase *C) {
|
||||||
if (Sec->Pieces.empty())
|
if (Sec->Pieces.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Sec->NumRelocations == 0)
|
if (Sec->AreRelocsRela)
|
||||||
addSectionAux(Sec, makeArrayRef<Elf_Rela>(nullptr, nullptr));
|
|
||||||
else if (Sec->AreRelocsRela)
|
|
||||||
addSectionAux(Sec, Sec->template relas<ELFT>());
|
addSectionAux(Sec, Sec->template relas<ELFT>());
|
||||||
else
|
else
|
||||||
addSectionAux(Sec, Sec->template rels<ELFT>());
|
addSectionAux(Sec, Sec->template rels<ELFT>());
|
||||||
|
|
Loading…
Reference in New Issue