[PATCH] D62991: [yaml2obj][MachO] Don't fill dummy data for virtual sections

Alexander Shaposhnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 10 14:50:15 PDT 2019


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

ok, this makes  sense to me now, thanks for the explanation. LGTM with a couple of inline comments



================
Comment at: llvm/tools/yaml2obj/yaml2macho.cpp:265
 
+static bool isVirtualSection(uint8_t type) {
+  return (type == MachO::S_ZEROFILL ||
----------------
I have a couple of comments here:
1. in general i think this should be moved out of yaml2macho.cpp into the library (libObject ?)
because I believe it's not the only place where this might be useful. I think this can be done as a follow up though.
2. the test probably can be a bit more robust (and check all these cases at once), but I don't insist. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62991





More information about the llvm-commits mailing list