aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2003-03-03 16:28:23 -0500
committerJason Merrill <jason@gcc.gnu.org>2003-03-03 16:28:23 -0500
commitd1a74aa7d3e30682a3e667a92671b668115e1426 (patch)
tree741f86ca04374ed16b82d6c1d12f545600129dc5 /gcc/tree-inline.c
parentd44cc4047b5ec4cb74a77f4bc46e6438d83f1ed5 (diff)
downloadgcc-d1a74aa7d3e30682a3e667a92671b668115e1426.zip
gcc-d1a74aa7d3e30682a3e667a92671b668115e1426.tar.gz
gcc-d1a74aa7d3e30682a3e667a92671b668115e1426.tar.bz2
tree-inline.c (find_builtin_longjmp_call): Save and restore lineno and input_filename.
* tree-inline.c (find_builtin_longjmp_call): Save and restore lineno and input_filename. (find_alloca_call): Likewise. (inlinable_function_p): Run the langhook earlier. * calls.c (compute_argument_addresses): Give the new MEMs a minimum alignment of PARM_BOUNDARY. cp/ * decl.c (start_function): Clear DECL_NUM_STMTS. * class.c (get_vtable_decl): Use vtbl_type_node. (build_primary_vtable): Check for it. From-SVN: r63733
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 5b5e775..77b7baf 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -895,7 +895,12 @@ static tree
find_alloca_call (exp)
tree exp;
{
- return walk_tree (&exp, find_alloca_call_1, NULL, NULL);
+ int line = lineno;
+ const char *file = input_filename;
+ tree ret = walk_tree (&exp, find_alloca_call_1, NULL, NULL);
+ lineno = line;
+ input_filename = file;
+ return ret;
}
static tree
@@ -921,7 +926,12 @@ static tree
find_builtin_longjmp_call (exp)
tree exp;
{
- return walk_tree (&exp, find_builtin_longjmp_call_1, NULL, NULL);
+ int line = lineno;
+ const char *file = input_filename;
+ tree ret = walk_tree (&exp, find_builtin_longjmp_call_1, NULL, NULL);
+ lineno = line;
+ input_filename = file;
+ return ret;
}
/* Returns nonzero if FN is a function that can be inlined into the
@@ -942,6 +952,11 @@ inlinable_function_p (fn, id)
if (DECL_UNINLINABLE (fn))
return 0;
+ /* Check this now so that we instantiate C++ templates before reading
+ DECL_NUM_STMTS. */
+ if ((*lang_hooks.tree_inlining.cannot_inline_tree_fn) (&fn))
+ return 0;
+
/* Assume it is not inlinable. */
inlinable = 0;
@@ -1022,9 +1037,6 @@ inlinable_function_p (fn, id)
}
}
- if (inlinable && (*lang_hooks.tree_inlining.cannot_inline_tree_fn) (&fn))
- inlinable = 0;
-
/* If we don't have the function body available, we can't inline
it. */
if (! DECL_SAVED_TREE (fn))