Getting the type of a Selector

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

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