[PATCH] D59019: [llvm-objcopy] - Remove an excessive zlib::isAvailable() check and dead code.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 6 04:52:23 PST 2019


jhenderson accepted this revision.
jhenderson added a comment.
This revision is now accepted and ready to land.

LGTM, even without the assertion.



================
Comment at: tools/llvm-objcopy/ELF/Object.cpp:265
     : SectionBase(Sec), CompressionType(CompressionType),
       DecompressedSize(Sec.OriginalData.size()), DecompressedAlign(Sec.Align) {
   if (Error E = zlib::compress(
----------------
grimar wrote:
> jhenderson wrote:
> > Maybe you should have an assertion here so that we don't try to create `CompressedSection` if there is no zlib?
> FTR: we still want to create it for the case 2 from the description, but it uses a different constructor.
> I'll update the patch with an assert here.
Right, yes, but as I just realised in D59017, no need for the assertion as zlib::compress already does it.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59019/new/

https://reviews.llvm.org/D59019





More information about the llvm-commits mailing list