diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-21 14:42:27 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-21 14:42:27 +0000 |
commit | 8f80e66d6505da8da44594d9b9ed79b769676dfd (patch) | |
tree | 1ac1f438d70d628d0614049b355e3d6dba77540d /gcc/c-decl.c | |
parent | b183fde1d88d179a3bb93c7d613191ad76ab4c15 (diff) | |
download | gcc-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/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index a2118fdfdc1..0f104a44cf0 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -1928,19 +1928,6 @@ duplicate_decls (newdecl, olddecl, different_binding_level) /* For functions, static overrides non-static. */ if (TREE_CODE (newdecl) == FUNCTION_DECL) { - /* If we're redefining a function previously defined as extern - inline, make sure we emit debug info for the inline before we - throw it away, in case it was inlined into a function that hasn't - been written out yet. */ - if (new_is_definition && DECL_INITIAL (olddecl) && TREE_USED (olddecl)) - { - note_outlining_of_inline_function (olddecl); - - /* The new defn must not be inline. - FIXME what about -finline-functions? */ - DECL_INLINE (newdecl) = 0; - } - TREE_PUBLIC (newdecl) &= TREE_PUBLIC (olddecl); /* This is since we don't automatically copy the attributes of NEWDECL into OLDDECL. */ @@ -1974,12 +1961,27 @@ duplicate_decls (newdecl, olddecl, different_binding_level) if (TREE_CODE (newdecl) == FUNCTION_DECL) { - /* If either decl says `inline', this fn is inline, - unless its definition was passed already. */ - if (DECL_INLINE (newdecl) && DECL_INITIAL (olddecl) == 0) - DECL_INLINE (olddecl) = 1; + /* If we're redefining a function previously defined as extern + inline, make sure we emit debug info for the inline before we + throw it away, in case it was inlined into a function that hasn't + been written out yet. */ + if (new_is_definition && DECL_INITIAL (olddecl) && TREE_USED (olddecl)) + { + note_outlining_of_inline_function (olddecl); - DECL_INLINE (newdecl) = DECL_INLINE (olddecl); + /* The new defn must not be inline. */ + DECL_INLINE (newdecl) = 0; + DECL_UNINLINABLE (newdecl) = 1; + } + else + { + /* If either decl says `inline', this fn is inline, + unless its definition was passed already. */ + if (DECL_INLINE (newdecl) && DECL_INITIAL (olddecl) == 0) + DECL_INLINE (olddecl) = 1; + + DECL_INLINE (newdecl) = DECL_INLINE (olddecl); + } if (DECL_BUILT_IN (olddecl)) { |