diff options
author | sandra <sandra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-28 19:21:20 +0000 |
---|---|---|
committer | sandra <sandra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-28 19:21:20 +0000 |
commit | d01f58f916ac4e68183fa9c4a92c33582f546b44 (patch) | |
tree | 34dad42b40269284ec633fd80ce8a06342ba7ea3 /gcc/cp/rtti.c | |
parent | 5331f35a8778193583ee027a3a01b417e3284643 (diff) | |
download | gcc-d01f58f916ac4e68183fa9c4a92c33582f546b44.tar.gz |
2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
* gcc/builtins.c (fold_builtin_call_list, fold_builtin_call_valist):
Delete, and replace with...
(fold_builtin_call_array): This. Update callers to use it.
* gcc/fold-const.c (fold_build_call_list): Delete, and replace with...
(fold_build_call_array): This.
(fold_build_call_list_initializer): Delete, and replace with...
(fold_build_call_array_initializer): This.
* gcc/tree.h: Update declarations to reflect above changes.
* gcc/c-typeck.c (build_function_call): Store converted arguments
in a stack-allocated array instead of building a list.
(convert_arguments): Store arguments in the array passed in as an
argument, and return the actual number of arguments.
* gcc/c-format.c: (check_function_format): Pass arguments in an
array instead of a list.
* gcc/c-common.c (check_function_nonnull): Likewise.
(check_function_sentinel): Likewise.
(check_function_arguments): Likewise.
* gcc/c-common.h: Update declarations to reflect above changes.
* gcc/cp/typeck.c (build_function_call): Store converted arguments
in a stack-allocated array instead of building a list.
(convert_arguments): Store arguments in the array passed in as an
argument, and return the actual number of arguments.
* gcc/cp/call.c (build_call): Delete, and replace with...
(build_call_n, build_call_a): New.
(build_op_delete_call): Rewrite to avoid constructing argument lists.
(build_over_call): Store converted arguments in a stack-allocated
array instead of building a list.
(build_cxx_call): Pass arguments in an array instead of as a list.
(build_java_interface_fn_ref): Rewrite to avoid constructing
argument lists.
* gcc/cp/tree.h: Update declarations to reflect above changes.
* gcc/cp/method.c (use_thunk): Use a stack-allocated array to hold
the arguments instead of a list.
* gcc/cp/rtti.c (throw_bad_cast): Update call to cxx_call.
(throw_bad_typeid): Likewise.
(build_dynamic_cast_1): Likewise.
* gcc/cp/init.c (build_builtin_delete_call): Use build_call_n.
* gcc/cp/decl.c (expand_static_init): Likewise.
* gcc/cp/except.c (cp_protect_cleanup_actions): Likewise.
* gcc/cp/cp-gimplify.c (genericize_eh_spec_block): Likewise.
(gimplify_must_not_throw_expr): Likewise.
(cxx_omp_apply_fn): Use build_call_a.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122411 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/rtti.c')
-rw-r--r-- | gcc/cp/rtti.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c index 8549ec07f11..121699f669d 100644 --- a/gcc/cp/rtti.c +++ b/gcc/cp/rtti.c @@ -196,7 +196,7 @@ throw_bad_cast (void) fn = push_throw_library_fn (fn, build_function_type (ptr_type_node, void_list_node)); - return build_cxx_call (fn, NULL_TREE); + return build_cxx_call (fn, 0, NULL); } /* Return an expression for "__cxa_bad_typeid()". The expression @@ -215,7 +215,7 @@ throw_bad_typeid (void) fn = push_throw_library_fn (fn, t); } - return build_cxx_call (fn, NULL_TREE); + return build_cxx_call (fn, 0, NULL); } /* Return an lvalue expression whose type is "const std::type_info" @@ -588,7 +588,8 @@ build_dynamic_cast_1 (tree type, tree expr) else { tree retval; - tree result, td2, td3, elems; + tree result, td2, td3; + tree elems[4]; tree static_type, target_type, boff; /* If we got here, we can't convert statically. Therefore, @@ -646,11 +647,10 @@ build_dynamic_cast_1 (tree type, tree expr) if (tc == REFERENCE_TYPE) expr1 = build_unary_op (ADDR_EXPR, expr1, 0); - elems = tree_cons - (NULL_TREE, expr1, tree_cons - (NULL_TREE, td3, tree_cons - (NULL_TREE, td2, tree_cons - (NULL_TREE, boff, NULL_TREE)))); + elems[0] = expr1; + elems[1] = td3; + elems[2] = td2; + elems[3] = boff; dcast_fn = dynamic_cast_node; if (!dcast_fn) @@ -680,7 +680,7 @@ build_dynamic_cast_1 (tree type, tree expr) pop_nested_namespace (ns); dynamic_cast_node = dcast_fn; } - result = build_cxx_call (dcast_fn, elems); + result = build_cxx_call (dcast_fn, 4, elems); if (tc == REFERENCE_TYPE) { |