aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl2.c
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2010-05-30 03:03:14 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2010-05-30 03:03:14 +0000
commit450f429348300e614722d03966ce898ab3ffb7f5 (patch)
tree84131f99052527c90f0168a49f3799ddf508f502 /gcc/cp/decl2.c
parentd79b77598e0280140e099c07877986cb4a93e01f (diff)
downloadgcc-450f429348300e614722d03966ce898ab3ffb7f5.zip
gcc-450f429348300e614722d03966ce898ab3ffb7f5.tar.gz
gcc-450f429348300e614722d03966ce898ab3ffb7f5.tar.bz2
cp-tree.h (cp_build_function_call_nary): Declare.
* cp-tree.h (cp_build_function_call_nary): Declare. * typeck.c (cp_build_function_call_nary): Define. * decl.c (register_dtor_fn): Use it instead of cp_build_function_call. (cxx_maybe_build_cleanup): Likewise. * decl2.c (generate_ctor_or_dtor_function): Likewise. * except.c (do_get_exception_ptr): Likewise. (do_begin_catch): Likewise. (do_allocate_exception): Likewise. (do_free_exception): Likewise. (build_throw): Likewise. Use cp_build_function_call_vec instead of cp_build_function_call. (do_end_catch): Likewise. From-SVN: r160045
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r--gcc/cp/decl2.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 0313101..0692e1a 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -3275,7 +3275,6 @@ generate_ctor_or_dtor_function (bool constructor_p, int priority,
location_t *locus)
{
char function_key;
- tree arguments;
tree fndecl;
tree body;
size_t i;
@@ -3308,17 +3307,18 @@ generate_ctor_or_dtor_function (bool constructor_p, int priority,
/* Calls to pure or const functions will expand to nothing. */
if (! (flags_from_decl_or_type (fndecl) & (ECF_CONST | ECF_PURE)))
{
+ tree call;
+
if (! body)
body = start_objects (function_key, priority);
- arguments = tree_cons (NULL_TREE,
- build_int_cst (NULL_TREE, priority),
- NULL_TREE);
- arguments = tree_cons (NULL_TREE,
- build_int_cst (NULL_TREE, constructor_p),
- arguments);
- finish_expr_stmt (cp_build_function_call (fndecl, arguments,
- tf_warning_or_error));
+ call = cp_build_function_call_nary (fndecl, tf_warning_or_error,
+ build_int_cst (NULL_TREE,
+ constructor_p),
+ build_int_cst (NULL_TREE,
+ priority),
+ NULL_TREE);
+ finish_expr_stmt (call);
}
}