diff options
author | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-09 15:18:40 +0000 |
---|---|---|
committer | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-09 15:18:40 +0000 |
commit | fb83f216f34375652930fdd2087bceb8deac6daa (patch) | |
tree | 99c1017dc9ca532faa156ceb39817e89d18bfb28 /gcc/cp/decl.c | |
parent | fd70b918fb48af1591d29b6496f293212a3b8456 (diff) | |
download | gcc-fb83f216f34375652930fdd2087bceb8deac6daa.tar.gz |
* call.c (build_java_interface_fn_ref): Call build_function_type_list
instead of build_function_type.
* decl.c (cxx_init_decl_processing): Likewise.
(declare_global_var): Likewise.
(get_atexit_node): Likewise.
(expand_static_init): Likewise.
* decl2.c (start_objects): Likewise.
(start_static_storage_duration_function): Likewise.
* except.c (init_exception_processing): Likewise.
(build_exc_ptr): Likewise.
(build_throw): Likewise.
* rtti.c (throw_bad_cast): Likewise.
(throw_bad_typeid): Likewise.
(build_dynamic_cast_1): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160486 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index ca3152f9caf..0c4ad496db3 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -3445,11 +3445,9 @@ cxx_init_decl_processing (void) vtable_index_type = ptrdiff_type_node; vtt_parm_type = build_pointer_type (const_ptr_type_node); - void_ftype = build_function_type (void_type_node, void_list_node); - void_ftype_ptr = build_function_type (void_type_node, - tree_cons (NULL_TREE, - ptr_type_node, - void_list_node)); + void_ftype = build_function_type_list (void_type_node, NULL_TREE); + void_ftype_ptr = build_function_type_list (void_type_node, + ptr_type_node, NULL_TREE); void_ftype_ptr = build_exception_variant (void_ftype_ptr, empty_except_spec); @@ -3506,10 +3504,7 @@ cxx_init_decl_processing (void) tree new_eh_spec; ptr_ftype_sizetype - = build_function_type (ptr_type_node, - tree_cons (NULL_TREE, - size_type_node, - void_list_node)); + = build_function_type_list (ptr_type_node, size_type_node, NULL_TREE); if (cxx_dialect == cxx98) { tree bad_alloc_id; @@ -6077,20 +6072,21 @@ declare_global_var (tree name, tree type) static tree get_atexit_fn_ptr_type (void) { - tree arg_types; tree fn_type; if (!atexit_fn_ptr_type_node) { + tree arg_type; if (flag_use_cxa_atexit && !targetm.cxx.use_atexit_for_cxa_atexit ()) /* The parameter to "__cxa_atexit" is "void (*)(void *)". */ - arg_types = tree_cons (NULL_TREE, ptr_type_node, void_list_node); + arg_type = ptr_type_node; else /* The parameter to "atexit" is "void (*)(void)". */ - arg_types = void_list_node; + arg_type = NULL_TREE; - fn_type = build_function_type (void_type_node, arg_types); + fn_type = build_function_type_list (void_type_node, + arg_type, NULL_TREE); atexit_fn_ptr_type_node = build_pointer_type (fn_type); } @@ -6105,7 +6101,6 @@ static tree get_atexit_node (void) { tree atexit_fndecl; - tree arg_types; tree fn_type; tree fn_ptr_type; const char *name; @@ -6122,25 +6117,28 @@ get_atexit_node (void) We build up the argument types and then then function type itself. */ + tree argtype0, argtype1, argtype2; use_aeabi_atexit = targetm.cxx.use_aeabi_atexit (); /* First, build the pointer-to-function type for the first argument. */ fn_ptr_type = get_atexit_fn_ptr_type (); /* Then, build the rest of the argument types. */ - arg_types = tree_cons (NULL_TREE, ptr_type_node, void_list_node); + argtype2 = ptr_type_node; if (use_aeabi_atexit) { - arg_types = tree_cons (NULL_TREE, fn_ptr_type, arg_types); - arg_types = tree_cons (NULL_TREE, ptr_type_node, arg_types); + argtype1 = fn_ptr_type; + argtype0 = ptr_type_node; } else { - arg_types = tree_cons (NULL_TREE, ptr_type_node, arg_types); - arg_types = tree_cons (NULL_TREE, fn_ptr_type, arg_types); + argtype1 = ptr_type_node; + argtype0 = fn_ptr_type; } /* And the final __cxa_atexit type. */ - fn_type = build_function_type (integer_type_node, arg_types); + fn_type = build_function_type_list (integer_type_node, + argtype0, argtype1, argtype2, + NULL_TREE); fn_ptr_type = build_pointer_type (fn_type); if (use_aeabi_atexit) name = "__aeabi_atexit"; @@ -6156,9 +6154,9 @@ get_atexit_node (void) We build up the argument types and then then function type itself. */ fn_ptr_type = get_atexit_fn_ptr_type (); - arg_types = tree_cons (NULL_TREE, fn_ptr_type, void_list_node); /* Build the final atexit type. */ - fn_type = build_function_type (integer_type_node, arg_types); + fn_type = build_function_type_list (integer_type_node, + fn_ptr_type, NULL_TREE); name = "atexit"; } @@ -6438,11 +6436,13 @@ expand_static_init (tree decl, tree init) abort_fn = get_identifier ("__cxa_guard_abort"); if (!get_global_value_if_present (acquire_fn, &acquire_fn)) { - tree argtypes = tree_cons (NULL_TREE, TREE_TYPE (guard_addr), - void_list_node); - tree vfntype = build_function_type (void_type_node, argtypes); + tree vfntype = build_function_type_list (void_type_node, + TREE_TYPE (guard_addr), + NULL_TREE); acquire_fn = push_library_fn - (acquire_fn, build_function_type (integer_type_node, argtypes), + (acquire_fn, build_function_type_list (integer_type_node, + TREE_TYPE (guard_addr), + NULL_TREE), NULL_TREE); release_fn = push_library_fn (release_fn, vfntype, NULL_TREE); abort_fn = push_library_fn (abort_fn, vfntype, NULL_TREE); |