[PATCH] D45305: ObjCGNU: Fix empty v3 protocols being emitted two fields short

Dustin L. Howett via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 7 18:35:52 PDT 2018


DHowett-MSFT added a comment.

It seems more fragile to check the contents of the protocol rather than the invariant we care most about (its size).
I'm willing to do that, and am updating the patch accordingly, but I don't want to commit to a more fragile test than is necessary.
Illustratively, if the GNUstep runtime one day chooses to emit empty v3 protocols as `{3, null, null, null, null, null, null, null}` (which it may want to do to avoid emitting empty method lists, and which seems to work at runtime), a test capturing the body of the protocol will fail.


Repository:
  rC Clang

https://reviews.llvm.org/D45305





More information about the cfe-commits mailing list