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
This commit is contained in:
Richard Henderson 2002-08-30 19:37:09 -07:00 committed by Richard Henderson
parent 38ec83b17a
commit 8a3c918078
3 changed files with 17 additions and 1 deletions

View File

@ -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

View File

@ -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 \

View File

@ -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;