From 6c41818449c4cbd10d6055be3483dfd04a3968b8 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Wed, 10 Jan 2001 23:06:30 +0000 Subject: output.h (make_function_rtl): Remove prototype. * output.h (make_function_rtl): Remove prototype. (make_decl_rtl): Likewise. * varasm.c (make_function_rtl): Remove. (make_decl_rtl): Determine top-levelness from DECL_CONTEXT, rather than from a third parameter. * tree.h (make_decl_rtl): Remove last parameter. * c-decl.c (builtin_function): Remove last argument in call to make_decl_rtl; use make_function_rtl instead of make_decl_rtl. (start_function): Likewise. * except.c (call_get_eh_context): Likewise. * expr.c (emit_block_move): Likewise. (clear_storage): Likewise. * profile.c (output_func_start_profiler): Likewise. * toplev.c (rest_of_decl_compilation): Likewise. * objc/objc-act.c (create_builtin_decl): Likewise. (synth_module_prologue): Likewise. (generate_static_reference): Likewise. (build_selector_reference_decl): Likewise. (build_class_reference_decl): Likewise. (build_objc_string_decl): Likewise. (build_protocol_reference): Likewise. * class.c (finish_struct_1): Remove last argument in call to make_decl_rtl; use make_function_rtl instead of make_decl_rtl. * decl.c (builtin_function): Likewise. (build_cp_library_fn): Likewise. (check_initializer): Likewise. (make_rtl_for_nonlocal_decl): Likewise. (cp_finish_decl): Likewise. (start_function): Likewise. * decl2.c (finish_anon_union): Likewise. * friend.c (do_friend): Likewise. * init.c (build_java_class_ref): Likewise. * method.c (make_thunk): Likewise. * pt.c (tsubst_friend_function): Likewise. * semantics.c (expand_body): Likewise. * com.c (ffecom_init_zero_): Remove last argument in call to make_decl_rtl; use make_function_rtl instead of make_decl_rtl. (ffecom_lookup_label_): Likewise. (builtin_function): Likewise. (start_function): Likewise. * class.c (build_utf8_ref): Remove last argument in call to make_decl_rtl; use make_function_rtl instead of make_decl_rtl. (build_class_ref): Likewise. (build_static_field_ref): Likewise. (get_dispatch_table): Likewise. (layout_class_method): Likewise. (emit_register_classes): Likewise. * constants.c (build_constant_data_ref): Likewise. * decl.c (builtin_function): Likewise. (create_primitive_vtable): Likewise. * expr.c (build_known_method_def): Likewise. (build_jni_stub): Likewise. (java_lang_expand_expr): Likewise. From-SVN: r38884 --- gcc/cp/ChangeLog | 17 +++++++++++++++++ gcc/cp/class.c | 2 +- gcc/cp/decl.c | 14 +++++++------- gcc/cp/decl2.c | 2 +- gcc/cp/friend.c | 4 ++-- gcc/cp/init.c | 2 +- gcc/cp/method.c | 2 +- gcc/cp/pt.c | 4 ++-- gcc/cp/semantics.c | 4 ++-- 9 files changed, 34 insertions(+), 17 deletions(-) (limited to 'gcc/cp') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 676a211..fa3b5ed 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,22 @@ 2001-01-10 Mark Mitchell + * class.c (finish_struct_1): Remove last argument in call to + make_decl_rtl; use make_function_rtl instead of make_decl_rtl. + * decl.c (builtin_function): Likewise. + (build_cp_library_fn): Likewise. + (check_initializer): Likewise. + (make_rtl_for_nonlocal_decl): Likewise. + (cp_finish_decl): Likewise. + (start_function): Likewise. + * decl2.c (finish_anon_union): Likewise. + * friend.c (do_friend): Likewise. + * init.c (build_java_class_ref): Likewise. + * method.c (make_thunk): Likewise. + * pt.c (tsubst_friend_function): Likewise. + * semantics.c (expand_body): Likewise. + +2001-01-10 Mark Mitchell + * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not looking at DECL_CLONED_FUNCTION for non-functions. diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 9079f97..888e8ae 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -5244,7 +5244,7 @@ finish_struct_1 (t) && TREE_TYPE (x) == t) { DECL_MODE (x) = TYPE_MODE (t); - make_decl_rtl (x, NULL, 0); + make_decl_rtl (x, NULL); } } diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 33c0f80..dfe69ac 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -6671,7 +6671,7 @@ builtin_function (name, type, code, class, libname) function in the namespace. */ if (libname) DECL_ASSEMBLER_NAME (decl) = get_identifier (libname); - make_function_rtl (decl); + make_decl_rtl (decl, NULL); /* Warn if a function in the namespace for users is used without an occasion to consider it declared. */ @@ -6709,7 +6709,7 @@ build_library_fn (name, type) tree type; { tree fn = build_library_fn_1 (name, ERROR_MARK, type); - make_function_rtl (fn); + make_decl_rtl (fn, NULL); return fn; } @@ -6725,7 +6725,7 @@ build_cp_library_fn (name, operator_code, type) TREE_NOTHROW (fn) = TYPE_NOTHROW_P (type); DECL_CONTEXT (fn) = FROB_CONTEXT (current_namespace); set_mangled_name_for_decl (fn); - make_function_rtl (fn); + make_decl_rtl (fn, NULL); return fn; } @@ -7612,7 +7612,7 @@ check_initializer (decl, init) else if (!DECL_EXTERNAL (decl) && TREE_CODE (type) == REFERENCE_TYPE) { if (TREE_STATIC (decl)) - make_decl_rtl (decl, NULL_PTR, toplevel_bindings_p ()); + make_decl_rtl (decl, NULL_PTR); grok_reference_init (decl, type, init); init = NULL_TREE; } @@ -7739,7 +7739,7 @@ make_rtl_for_nonlocal_decl (decl, init, asmspec) /* If we're deferring the variable, just make RTL. Do not actually emit the variable. */ if (defer_p) - make_decl_rtl (decl, asmspec, toplev); + make_decl_rtl (decl, asmspec); /* If we're not deferring, go ahead and assemble the variable. */ else rest_of_decl_compilation (decl, asmspec, toplev, at_eof); @@ -8020,7 +8020,7 @@ cp_finish_decl (decl, init, asmspec_tree, flags) grokclassfn. Lay this out fresh. */ DECL_RTL (TREE_TYPE (decl)) = NULL_RTX; DECL_ASSEMBLER_NAME (decl) = get_identifier (asmspec); - make_decl_rtl (decl, asmspec, 0); + make_decl_rtl (decl, asmspec); } /* Deduce size of array from initialization, if not already known. */ @@ -13598,7 +13598,7 @@ start_function (declspecs, declarator, attrs, flags) /* We need to do this even if we aren't expanding yet so that assemble_external works. */ - make_function_rtl (decl1); + make_decl_rtl (decl1, NULL); /* Promote the value to int before returning it. */ if (C_PROMOTING_INTEGER_TYPE_P (restype)) diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index c41126a..e099056 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -2227,7 +2227,7 @@ finish_anon_union (anon_union_decl) if (static_p) { - make_decl_rtl (main_decl, 0, toplevel_bindings_p ()); + make_decl_rtl (main_decl, 0); DECL_RTL (anon_union_decl) = DECL_RTL (main_decl); expand_anon_union_decl (anon_union_decl, NULL_TREE, diff --git a/gcc/cp/friend.c b/gcc/cp/friend.c index 1cc99052..df3281e 100644 --- a/gcc/cp/friend.c +++ b/gcc/cp/friend.c @@ -1,5 +1,5 @@ /* Help friends in C++. - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU CC. @@ -409,7 +409,7 @@ do_friend (ctype, declarator, decl, parmdecls, attrlist, } } - make_decl_rtl (decl, NULL_PTR, 1); + make_decl_rtl (decl, NULL_PTR); add_friend (current_class_type, is_friend_template ? DECL_TI_TEMPLATE (decl) : decl); DECL_FRIEND_P (decl) = 1; diff --git a/gcc/cp/init.c b/gcc/cp/init.c index e9eddf9..98f4bbd 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -2233,7 +2233,7 @@ build_java_class_ref (type) DECL_ARTIFICIAL (class_decl) = 1; DECL_IGNORED_P (class_decl) = 1; pushdecl_top_level (class_decl); - make_decl_rtl (class_decl, NULL_PTR, 1); + make_decl_rtl (class_decl, NULL_PTR); } return class_decl; } diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 574d6ec..3e6b3cc 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -2177,7 +2177,7 @@ make_thunk (function, delta, vcall_index, generate_with_vtable_p) /* So that finish_file can write out any thunks that need to be: */ pushdecl_top_level (thunk); /* Create RTL for this thunk so that its address can be taken. */ - make_function_rtl (thunk); + make_decl_rtl (thunk, NULL); } return thunk; } diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 5d4a1bf..a6a9381 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -4525,7 +4525,7 @@ tsubst_friend_function (decl, args) { set_mangled_name_for_decl (new_friend); DECL_RTL (new_friend) = 0; - make_decl_rtl (new_friend, NULL_PTR, 1); + make_decl_rtl (new_friend, NULL_PTR); } if (DECL_NAMESPACE_SCOPE_P (new_friend)) @@ -5789,7 +5789,7 @@ tsubst_decl (t, args, type, in_decl) } DECL_RTL (r) = 0; - make_decl_rtl (r, NULL_PTR, 1); + make_decl_rtl (r, NULL_PTR); /* Like grokfndecl. If we don't do this, pushdecl will mess up our TREE_CHAIN because it doesn't find a diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index d2ec8f5..cf88279 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -3,7 +3,7 @@ building RTL. These routines are used both during actual parsing and during the instantiation of template functions. - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. Written by Mark Mitchell (mmitchell@usa.net) based on code found formerly in parse.y and pt.c. @@ -2367,7 +2367,7 @@ expand_body (fn) { /* Give the function RTL now so that we can assign it to a function pointer, etc. */ - make_function_rtl (fn); + make_decl_rtl (fn, NULL); /* Set DECL_EXTERNAL so that assemble_external will be called as necessary. We'll clear it again in finish_file. */ if (!DECL_EXTERNAL (fn)) -- cgit v1.1