This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Do we still need get_callee_fndecl?


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?

Kazu Hirata


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]