aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index bd45b15..dbf2543 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -948,6 +948,11 @@ inlinable_function_p (tree fn, inline_data *id, int nolimit)
in C++ it may result in template instantiation.) */
inlinable = !(*lang_hooks.tree_inlining.cannot_inline_tree_fn) (&fn);
+ /* If we don't have the function body available, we can't inline
+ it. */
+ if (! DECL_SAVED_TREE (fn))
+ return 0;
+
/* We may be here either because fn is declared inline or because
we use -finline-functions. For the second case, we are more
restrictive. */
@@ -1027,11 +1032,6 @@ inlinable_function_p (tree fn, inline_data *id, int nolimit)
}
}
- /* If we don't have the function body available, we can't inline
- it. */
- if (! DECL_SAVED_TREE (fn))
- inlinable = 0;
-
/* Check again, language hooks may have modified it. */
if (! inlinable || DECL_UNINLINABLE (fn))
return 0;