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?



On Mar 22, 2005, at 8:14 AM, Kazu Hirata wrote:
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



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