[cfe-dev] Getting the type of a Selector

Fariborz Jahanian fjahanian at apple.com
Tue Feb 3 11:11:49 PST 2009


I needed that object type for nonfragile ivar abi. So, I passed it  
down (along with
the object llvm::Value to the runtime-specific routine for ivar  
access. But this
requires you to modify the runtime routine. Another possibility is to  
save in in the
CFG structure as a new data member.

- fariborz

On Feb 3, 2009, at 10:01 AM, David Chisnall wrote:

> Hi,
>
> Since the Objecgtive-C runtime interface has now been changed to not
> pass the type information along with the selector, can someone suggest
> the best way of attaining it?  The only case when it's really
> important is when generating a message send.  Here a typed selector
> with a type encoding corresponding to the types of the method on the
> class of the receiver expression.
>
> Unfortunately, the receiver is passed in as an llvm::Value and the
> Selector instance does not carry type information.
>
> GCC emits this and we're now using it with the GNUstep implementation
> of NSInvocation to ensure that the layout of the stack frame in the
> caller and callee agree (throwing a run-time exception when they
> don't, which has helped us found a couple of bugs so far and I would
> rather not lose this capability with clang.
>
> I can't see an obvious way of getting this information from the
> objects already passed to the CGObjCRuntime instance.  I wonder if
> someone can suggest the best approach for me to take here?
>
> David
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list