+ // The frontend treats 'id' as a typedef to an ObjCObjectType,
+ // whereas 'id<protocol>' is treated as an ObjCPointerType. For the
+ // debug info, we want to emit 'id' in both cases.
+ QualType PointeeType = Ty->getPointeeType();
+ if (const ObjCObjectType *Obj = dyn_cast<ObjCObjectType>(PointeeType))
+ if (Obj->isObjCId() && (Obj->getNumProtocols() > 0)) {
+ return getOrCreateType(CGM.getContext().getObjCIdType(), Unit);
+ }
Please use isObjCQualifiedIdType instead.
- Fariborz
On Feb 20, 2013, at 3:20 PM, Adrian Prantl <[email protected]> wrote:
> Hi CFEes,
>
> please review the following patch:
>
> Emit the DIType for ObjC 'id<protocol>' as 'id' rather than objc_object*
> Fix for rdar://problem/12601916.
>
> The frontend treats 'id' as a typedef to an ObjCObjectType,
> whereas 'id<protocol>' is treated as an ObjCPointerType. For the
> debug info, we want to emit 'id' in both cases.
>
> cheers,
> Adrian
>
> <id-protocol-as-id.patch>_______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits