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

LGTM.



================
Comment at: lib/CodeGen/CGObjCMac.cpp:6788
+         "emitting protocol metadata without definition");
+  PD = PD->getDefinition();
 
----------------
arphaman wrote:
> rjmccall wrote:
> > What happens in the `@implementation` case (the one that we're not 
> > diagnosing yet) when the protocol is a forward declaration?
> We emit an `external global` reference to the protocol metadata using 
> `GetOrEmitProtocolRef`, so this assertion won't be triggered until we force 
> the emission of protocol metadata from implementation as planned in a 
> follow-up patch.
Okay.  I mean, that's also unfortunate behavior, since protocol descriptors are 
basically `linkonce` and should be emitted in every translation unit that uses 
them, but I agree it's less damaging than the behavior for `@protocol`, and it 
means this assertion is safe.


Repository:
  rC Clang

https://reviews.llvm.org/D49462



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to