[PATCH] D85821: [MachOYAML] Simplify the section data emitting function. NFC.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 02:39:23 PDT 2020


grimar added a comment.

In D85821#2212674 <https://reviews.llvm.org/D85821#2212674>, @jhenderson wrote:

> Looks fine. I'm slightly nervous by the hard-coded `16` for the section name max length, but it's probably okay for now, and is no worse than what was there before.

Why don't we use something like
`assert(sizeof(segname) == 16)`, or a static assert for `segname`, or `strnlen(Sec.sectname, sizeof(segname))`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85821



More information about the llvm-commits mailing list