From: Fangrui Song Date: Mon, 21 Nov 2022 00:02:36 +0000 (+0000) Subject: [ELF] Simplify InputSectionBase::getSize X-Git-Tag: upstream/17.0.6~27038 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=565b3b01b11f1e76bb6f93fe0da02309354525b5;p=platform%2Fupstream%2Fllvm.git [ELF] Simplify InputSectionBase::getSize --- diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index f08db55..5238639 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -103,9 +103,7 @@ InputSectionBase::InputSectionBase(ObjFile &file, size_t InputSectionBase::getSize() const { if (auto *s = dyn_cast(this)) return s->getSize(); - if (compressed) - return size; - return content().size() - bytesDropped; + return size - bytesDropped; } template