From: Nathan Froyd Date: Wed, 19 May 2010 00:43:27 +0000 (+0000) Subject: Revert: X-Git-Tag: releases/gcc-4.6.0~7189 X-Git-Url: https://gcc.gnu.org/git/?a=commitdiff_plain;h=39b27b3a47310b99510dd1124a75c5b7f65bb82a;p=gcc.git Revert: 2010-05-18 Nathan Froyd * tree.h (build_call_list): Remove. * tree.c (build_call_list): Remove. From-SVN: r159554 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 727b024020d9..5af3ae534b3b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2010-05-18 Nathan Froyd + + Revert: + 2010-05-18 Nathan Froyd + + * tree.h (build_call_list): Remove. + * tree.c (build_call_list): Remove. + 2010-05-18 Nathan Froyd * tree.h (build_call_list): Remove. diff --git a/gcc/tree.c b/gcc/tree.c index 9374bfa215d5..76be316eef9f 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -9486,6 +9486,27 @@ build_vl_exp_stat (enum tree_code code, int len MEM_STAT_DECL) return t; } + +/* Build a CALL_EXPR of class tcc_vl_exp with the indicated RETURN_TYPE + and FN and a null static chain slot. ARGLIST is a TREE_LIST of the + arguments. */ + +tree +build_call_list (tree return_type, tree fn, tree arglist) +{ + tree t; + int i; + + t = build_vl_exp (CALL_EXPR, list_length (arglist) + 3); + TREE_TYPE (t) = return_type; + CALL_EXPR_FN (t) = fn; + CALL_EXPR_STATIC_CHAIN (t) = NULL_TREE; + for (i = 0; arglist; arglist = TREE_CHAIN (arglist), i++) + CALL_EXPR_ARG (t, i) = TREE_VALUE (arglist); + process_call_operands (t); + return t; +} + /* Build a CALL_EXPR of class tcc_vl_exp with the indicated RETURN_TYPE and FN and a null static chain slot. NARGS is the number of call arguments which are specified as "..." arguments. */ diff --git a/gcc/tree.h b/gcc/tree.h index 0f099587c028..e2f54a3f08f9 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4038,6 +4038,7 @@ extern tree build_omp_clause (location_t, enum omp_clause_code); extern tree build_vl_exp_stat (enum tree_code, int MEM_STAT_DECL); #define build_vl_exp(c,n) build_vl_exp_stat (c,n MEM_STAT_INFO) +extern tree build_call_list (tree, tree, tree); extern tree build_call_nary (tree, tree, int, ...); extern tree build_call_valist (tree, tree, int, va_list); #define build_call_array(T1,T2,N,T3)\