summaryrefslogtreecommitdiff
path: root/gcc/cp/optimize.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2001-02-21 14:42:27 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2001-02-21 14:42:27 +0000
commit8f80e66d6505da8da44594d9b9ed79b769676dfd (patch)
tree1ac1f438d70d628d0614049b355e3d6dba77540d /gcc/cp/optimize.c
parentb183fde1d88d179a3bb93c7d613191ad76ab4c15 (diff)
downloadgcc-8f80e66d6505da8da44594d9b9ed79b769676dfd.tar.gz
* tree.h (DECL_UNINLINABLE): Move from C++ frontend.
(struct tree_decl): Add uninlinable bitfield. * c-decl.c (duplicate_decls): Set it. * integrate.c (function_cannot_inline_p): Check it. * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag. (DECL_UNINLINABLE): Move to middle-end. * dwarf2out.c (add_name_and_src_coords_attributes): Don't add DW_AT_MIPS_linkage_name to abstract methods. (dwarf2out_abstract_function): Emit class context before calling set_decl_abstract_flags. Don't clear DECL_ABSTRACT. (gen_subprogram_die): Remove obsolete code. (gen_member_die): Don't include clones in the member list. (gen_decl_die): Emit abstract info for clone origin. * dwarfout.c (output_type): Don't include clones in the member list. * dbxout.c (dbxout_type_methods): Ignore abstract methods. * toplev.c (note_deferral_of_defined_inline_function): Don't clear DECL_ABSTRACT on a function that already has it set. * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn. * decl.c (duplicate_decls): Preserve DECL_ABSTRACT. * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone. * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the parms and outer BLOCK. note_deferral_of_defined_inline_function. * dwarf2out.c (gen_formal_types_die): Also accept a FUNCTION_DECL. (get_subprogram_die): Pass it in. * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on second parm of op=. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39945 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/optimize.c')
-rw-r--r--gcc/cp/optimize.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c
index 115b4670adb..21c94eafee6 100644
--- a/gcc/cp/optimize.c
+++ b/gcc/cp/optimize.c
@@ -932,6 +932,9 @@ maybe_clone_body (fn)
&& !DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (fn))
return 0;
+ /* Emit the DWARF1 abstract instance. */
+ note_deferral_of_defined_inline_function (fn);
+
/* We know that any clones immediately follow FN in the TYPE_METHODS
list. */
for (clone = TREE_CHAIN (fn);
@@ -996,6 +999,7 @@ maybe_clone_body (fn)
from the CLONE to this parameter. */
if (DECL_HAS_VTT_PARM_P (clone))
{
+ DECL_ABSTRACT_ORIGIN (clone_parm) = parm;
splay_tree_insert (id.decl_map,
(splay_tree_key) parm,
(splay_tree_value) clone_parm);
@@ -1013,6 +1017,7 @@ maybe_clone_body (fn)
function. */
else
{
+ DECL_ABSTRACT_ORIGIN (clone_parm) = parm;
splay_tree_insert (id.decl_map,
(splay_tree_key) parm,
(splay_tree_value) clone_parm);
@@ -1029,7 +1034,9 @@ maybe_clone_body (fn)
/* Now, expand this function into RTL, if appropriate. */
function_name_declared_p = 1;
- expand_body (finish_function (0));
+ finish_function (0);
+ BLOCK_ABSTRACT_ORIGIN (DECL_INITIAL (clone)) = DECL_INITIAL (fn);
+ expand_body (clone);
pop_from_top_level ();
}