[cfe-dev] Getting the type of a Selector
David Chisnall
csdavec at swansea.ac.uk
Tue Feb 3 10:01:08 PST 2009
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
More information about the cfe-dev
mailing list