Do we still need get_callee_fndecl?

Dale Johannesen dalej@apple.com
Tue Mar 22 20:04:00 GMT 2005


On Mar 22, 2005, at 10:21 AM, Kazu Hirata wrote:
> Hi Dale,
>>> After all, all we need in get_callee_fndecl seems to be
>>>
>>>   addr = TREE_OPERAND (call_expr, 0);
>>>   return ((TREE_CODE (addr) == ADDR_EXPR
>>> 	   && TREE_CODE (TREE_OPERAND (addr, 0)) == FUNCTION_DECL)
>>> 	  ? TREE_OPERAND (addr, 0) : NULL_TREE;
>>>
>>> Thoughts?
>>
>> In Objective C (and ObjC++) it's also a good idea to look under
>> OBJ_TYPE_REF.
>> See this patch, which was deferred to 4.1 and I'm going to resubmit 
>> RSN:
>> http://gcc.gnu.org/ml/gcc-patches/2004-12/txt00122.txt
>
> Thanks for the information.  Does OBJ_TYPE_REF_EXPR only apply to a
> CALL_EXPR?  In other words, are there other forms of constants that
> are exposed by looking into OBJ_TYPE_REF_EXPR?

I believe the usage here is the only one relevant to ObjC.
It is used for other things in C++, but I don't know how.



More information about the Gcc mailing list