Simplify.

ArrayRef<T>() equals to ArrayRef<T>(nullptr, 0), so it looks like
we don't need to handle size 0 as a special case.

llvm-svn: 316600
This commit is contained in:
Rui Ueyama 2017-10-25 18:09:54 +00:00
parent 2a5015b11b
commit cfa171d68c
1 changed files with 4 additions and 8 deletions

View File

@ -824,14 +824,10 @@ template <class ELFT> void EhInputSection::split() {
if (!this->Pieces.empty()) if (!this->Pieces.empty())
return; return;
if (this->NumRelocations) { if (this->AreRelocsRela)
if (this->AreRelocsRela) split<ELFT>(this->relas<ELFT>());
split<ELFT>(this->relas<ELFT>()); else
else split<ELFT>(this->rels<ELFT>());
split<ELFT>(this->rels<ELFT>());
return;
}
split<ELFT>(makeArrayRef<typename ELFT::Rela>(nullptr, nullptr));
} }
template <class ELFT, class RelTy> template <class ELFT, class RelTy>