summaryrefslogtreecommitdiff
path: root/gcc/langhooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/langhooks.c')
-rw-r--r--gcc/langhooks.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index 4ad9ae3e960..c189a3b50b9 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -153,8 +153,12 @@ lhd_tree_inlining_walk_subtrees (tp,subtrees,func,data,htab)
int
lhd_tree_inlining_cannot_inline_tree_fn (fnp)
- tree *fnp ATTRIBUTE_UNUSED;
+ tree *fnp;
{
+ if (optimize == 0
+ && lookup_attribute ("always_inline", DECL_ATTRIBUTES (*fnp)) == NULL)
+ return 1;
+
return 0;
}
@@ -164,8 +168,11 @@ lhd_tree_inlining_cannot_inline_tree_fn (fnp)
int
lhd_tree_inlining_disregard_inline_limits (fn)
- tree fn ATTRIBUTE_UNUSED;
+ tree fn;
{
+ if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) != NULL)
+ return 1;
+
return 0;
}