rjmccall added inline comments.
================
Comment at: clang/lib/CodeGen/CGObjC.cpp:459
+  llvm::Value *Receiver =
+      CGF.CGM.getObjCRuntime().GetClass(CGF, ObjTy->getInterface());
+  return CGF.EmitObjCAllocInit(Receiver, CGF.ConvertType(OME->getType()));
----------------
You might need to check for a `super` message send, which can be a class 
message send in a class method.

Also, I think `getInterface()` can return null here, although it might need to 
be contrived to fit the other requirements.  `Class<SomeProtocol>`, where that 
protocol declares `+alloc`?  If there isn't a way to just emit the receiver 
pointer of a normal message send from an `ObjCMessageExpr`, that's really too 
bad.


Repository:
  rC Clang

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

https://reviews.llvm.org/D57936



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

Reply via email to