diff options
author | Richard Henderson <rth@redhat.com> | 2002-08-30 19:37:09 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2002-08-30 19:37:09 -0700 |
commit | 8a3c918078119f96266a8a771976c36264fd8fa0 (patch) | |
tree | d1481b0efcaba8f2b514a2c58cf62d1c10e1b803 /gcc | |
parent | 38ec83b17afd5769823418e574240eb81ec8e44a (diff) | |
download | gcc-8a3c918078119f96266a8a771976c36264fd8fa0.zip gcc-8a3c918078119f96266a8a771976c36264fd8fa0.tar.gz gcc-8a3c918078119f96266a8a771976c36264fd8fa0.tar.bz2 |
tree.c: Include target.h.
* tree.c: Include target.h.
(cp_cannot_inline_tree_fn): Don't auto-inline functions that
don't bind locally.
* Makefile.in (tree.o): Update.
From-SVN: r56692
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/Make-lang.in | 2 | ||||
-rw-r--r-- | gcc/cp/tree.c | 9 |
3 files changed, 17 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index adb6f13..4c650c1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2002-08-30 Richard Henderson <rth@redhat.com> + + * tree.c: Include target.h. + (cp_cannot_inline_tree_fn): Don't auto-inline functions that + don't bind locally. + * Makefile.in (tree.o): Update. + 2002-08-27 Mark Mitchell <mark@codesourcery.com> * class.c (layout_virtual_bases): Warn about bugs in G++ that diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in index d174691..3235149 100644 --- a/gcc/cp/Make-lang.in +++ b/gcc/cp/Make-lang.in @@ -280,7 +280,7 @@ cp/method.o: cp/method.c $(CXX_TREE_H) toplev.h $(GGC_H) $(RTL_H) $(EXPR_H) \ cp/cvt.o: cp/cvt.c $(CXX_TREE_H) cp/decl.h flags.h toplev.h convert.h cp/search.o: cp/search.c $(CXX_TREE_H) stack.h flags.h toplev.h $(RTL_H) cp/tree.o: cp/tree.c $(CXX_TREE_H) flags.h toplev.h $(GGC_H) $(RTL_H) \ - insn-config.h integrate.h tree-inline.h real.h gt-cp-tree.h + insn-config.h integrate.h tree-inline.h real.h gt-cp-tree.h $(TARGET_H) cp/ptree.o: cp/ptree.c $(CXX_TREE_H) $(SYSTEM_H) cp/rtti.o: cp/rtti.c $(CXX_TREE_H) flags.h toplev.h cp/except.o: cp/except.c $(CXX_TREE_H) flags.h $(RTL_H) except.h toplev.h \ diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 6e09285..b0bd4fe 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA. */ #include "insn-config.h" #include "integrate.h" #include "tree-inline.h" +#include "target.h" static tree bot_manip PARAMS ((tree *, int *, void *)); static tree bot_replace PARAMS ((tree *, int *, void *)); @@ -2211,6 +2212,14 @@ cp_cannot_inline_tree_fn (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)) + { + DECL_UNINLINABLE (fn) = 1; + return 1; + } + if (varargs_function_p (fn)) { DECL_UNINLINABLE (fn) = 1; |