[PATCH] D80859: [lld-macho] Ensure __bss sections we output have file offset of zero

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 9 19:52:52 PDT 2020


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

I'm okay with your `isZeroFill` solution. Making a separate class seems like overkill for now, considering the check is needed in a grand total of three places (four if you count the resulting conditional in InputSection::writeTo, but still). A separate class might be cleaner from a Software Engineering™ perspective, but I think you'd still end up with two checks in that case (one to make a ZeroFillSection instead of an InputSection, and one for the writer fileOff logic), so it doesn't seem worth the extra complexity.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80859





More information about the llvm-commits mailing list