diff options
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 77b7baf..e1fab06 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -952,11 +952,6 @@ 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; @@ -1037,6 +1032,9 @@ 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)) |