mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-18 14:30:42 +08:00
tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat functions.
* tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat functions. From-SVN: r77330
This commit is contained in:
parent
693dcd3d88
commit
6039a93dd7
@ -1,3 +1,8 @@
|
||||
2004-02-05 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
|
||||
functions.
|
||||
|
||||
2003-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
|
||||
|
||||
PR c++/14008
|
||||
|
@ -2080,8 +2080,12 @@ cp_cannot_inline_tree_fn (tree* fnp)
|
||||
return 1;
|
||||
|
||||
/* Don't auto-inline anything that might not be bound within
|
||||
this unit of translation. */
|
||||
if (!DECL_DECLARED_INLINE_P (fn) && !(*targetm.binds_local_p) (fn))
|
||||
this unit of translation.
|
||||
Exclude comdat functions from this rule. While they can be bound
|
||||
to the other unit, they all must be the same. This is especilly
|
||||
important so templates can inline. */
|
||||
if (!DECL_DECLARED_INLINE_P (fn) && !(*targetm.binds_local_p) (fn)
|
||||
&& !DECL_COMDAT (fn))
|
||||
{
|
||||
DECL_UNINLINABLE (fn) = 1;
|
||||
return 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user