This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lto] PATCH: CALL_EXPR changes to gcc/objc/objc-act.c
- From: Sandra Loosemore <sandra at codesourcery dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 21 Jul 2006 20:45:50 -0400
- Subject: [lto] PATCH: CALL_EXPR changes to gcc/objc/objc-act.c
Already committed as "obvious".
-Sandra
2006-07-21 Sandra Loosemore <sandra@codesourcery.com>
* gcc/objc/objc-act.c (receiver_is_class_object): Use new
CALL_EXPR accessors.
(objc_get_callee_fndecl): Likewise.
Index: gcc/objc/objc-act.c
===================================================================
*** gcc/objc/objc-act.c (revision 115645)
--- gcc/objc/objc-act.c (working copy)
*************** receiver_is_class_object (tree receiver,
*** 6117,6123 ****
/* The receiver is a function call that returns an id. Check if
it is a call to objc_getClass, if so, pick up the class name. */
if (TREE_CODE (receiver) == CALL_EXPR
! && (exp = TREE_OPERAND (receiver, 0))
&& TREE_CODE (exp) == ADDR_EXPR
&& (exp = TREE_OPERAND (exp, 0))
&& TREE_CODE (exp) == FUNCTION_DECL
--- 6117,6123 ----
/* The receiver is a function call that returns an id. Check if
it is a call to objc_getClass, if so, pick up the class name. */
if (TREE_CODE (receiver) == CALL_EXPR
! && (exp = CALL_EXPR_FN (receiver))
&& TREE_CODE (exp) == ADDR_EXPR
&& (exp = TREE_OPERAND (exp, 0))
&& TREE_CODE (exp) == FUNCTION_DECL
*************** receiver_is_class_object (tree receiver,
*** 6127,6135 ****
&& TREE_TYPE (exp) == TREE_TYPE (objc_get_class_decl)
&& !strcmp (IDENTIFIER_POINTER (DECL_NAME (exp)), TAG_GETCLASS)
/* We have a call to objc_get_class/objc_getClass! */
! && (arg = TREE_OPERAND (receiver, 1))
! && TREE_CODE (arg) == TREE_LIST
! && (arg = TREE_VALUE (arg)))
{
STRIP_NOPS (arg);
if (TREE_CODE (arg) == ADDR_EXPR
--- 6127,6133 ----
&& TREE_TYPE (exp) == TREE_TYPE (objc_get_class_decl)
&& !strcmp (IDENTIFIER_POINTER (DECL_NAME (exp)), TAG_GETCLASS)
/* We have a call to objc_get_class/objc_getClass! */
! && (arg = call_expr_arg (receiver, 0)))
{
STRIP_NOPS (arg);
if (TREE_CODE (arg) == ADDR_EXPR
*************** objc_gimplify_expr (tree *expr_p, tree *
*** 9491,9497 ****
tree
objc_get_callee_fndecl (tree call_expr)
{
! tree addr = TREE_OPERAND (call_expr, 0);
if (TREE_CODE (addr) != OBJ_TYPE_REF)
return 0;
--- 9489,9495 ----
tree
objc_get_callee_fndecl (tree call_expr)
{
! tree addr = CALL_EXPR_FN (call_expr);
if (TREE_CODE (addr) != OBJ_TYPE_REF)
return 0;