From: Rui Ueyama Date: Wed, 25 Oct 2017 18:09:54 +0000 (+0000) Subject: Simplify. X-Git-Tag: llvmorg-6.0.0-rc1~4897 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cfa171d68c8e22f0c789639a6760e578ba774759;p=platform%2Fupstream%2Fllvm.git Simplify. ArrayRef() equals to ArrayRef(nullptr, 0), so it looks like we don't need to handle size 0 as a special case. llvm-svn: 316600 --- diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index 56b68da..7c3e2eb 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -824,14 +824,10 @@ template void EhInputSection::split() { if (!this->Pieces.empty()) return; - if (this->NumRelocations) { - if (this->AreRelocsRela) - split(this->relas()); - else - split(this->rels()); - return; - } - split(makeArrayRef(nullptr, nullptr)); + if (this->AreRelocsRela) + split(this->relas()); + else + split(this->rels()); } template