[PATCH] D47233: [CodeGen] Emit MSVC RTTI for Obj-C EH types

Shoaib Meenai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 10 22:34:45 PDT 2018


smeenai added inline comments.


================
Comment at: lib/CodeGen/CGObjCMac.cpp:7457-7460
 CGObjCNonFragileABIMac::GetEHType(QualType T) {
   // There's a particular fixed type info for 'id'.
   if (T->isObjCIdType() || T->isObjCQualifiedIdType()) {
+    if (CGM.getTriple().isWindowsMSVCEnvironment())
----------------
rjmccall wrote:
> smeenai wrote:
> > rjmccall wrote:
> > > rnk wrote:
> > > > @rjmccall how should this be organized in the long run? At this point, the naming seems totally wrong. Is the non-fragile ABI sort of the canonical way forward for Obj-C, i.e. it's what a new platform would want to use to best stay in sync with the future of obj-c?
> > > For Darwin, yes, absolutely.
> > > 
> > > I think this method should probably just completely delegate to the `CGCXXABI` using a new `getAddrOfObjCRTTIDescriptor` method.
> > To be clear, you'd want the entirety of the EHType emission logic to be shifted to CGCXXABI? I think that would make sense, and I can look into it.
> Right.
Sorry, getting back to this now.

What did you have in mind for handling the different Obj-C runtimes? Were you envisioning the new getAddrOfObjCRTTIDescriptor method supporting just the non-fragile Mac ABI or all of them?


Repository:
  rC Clang

https://reviews.llvm.org/D47233





More information about the cfe-commits mailing list