# HG changeset patch # User Nobuyasu Oshiro # Date 1313953261 -32400 # Node ID 3c5ea37d90686e374965e8f318f80c2ea5b4e01c # Parent f26ecf70364b3b16c68af91a761ffc2699670fb3 update gcc to gcc-4.6 diff -r f26ecf70364b -r 3c5ea37d9068 gcc/tree.c --- a/gcc/tree.c Mon Aug 22 03:31:39 2011 +0900 +++ b/gcc/tree.c Mon Aug 22 04:01:01 2011 +0900 @@ -10591,6 +10591,22 @@ return NULL; } +/* Build and return a TREE_LIST of arguments in the CALL_EXPR exp. + FIXME: don't use this function. It exists for compatibility with + the old representation of CALL_EXPRs where a list was used to hold the + arguments. Places that currently extract the arglist from a CALL_EXPR + ought to be rewritten to use the CALL_EXPR itself. */ +tree +call_expr_arglist (tree exp) +{ + tree arglist = NULL_TREE; + int i; + for (i = call_expr_nargs (exp) - 1; i >= 0; i--) + arglist = tree_cons (NULL_TREE, CALL_EXPR_ARG (exp, i), arglist); + return arglist; +} + + /* Create a nameless artificial label and put it in the current function context. The label has a location of LOC. Returns the newly created label. */ diff -r f26ecf70364b -r 3c5ea37d9068 gcc/tree.h --- a/gcc/tree.h Mon Aug 22 03:31:39 2011 +0900 +++ b/gcc/tree.h Mon Aug 22 04:01:01 2011 +0900 @@ -4952,6 +4952,7 @@ extern int operand_equal_for_phi_arg_p (const_tree, const_tree); extern tree call_expr_arg (tree, int); extern tree *call_expr_argp (tree, int); +extern tree call_expr_arglist (tree); extern tree create_artificial_label (location_t); extern const char *get_name (tree); extern bool stdarg_p (const_tree);