summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/c-objc-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc/c-objc-common.c')
-rw-r--r--contrib/gcc/c-objc-common.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/gcc/c-objc-common.c b/contrib/gcc/c-objc-common.c
index 0ed3869..43ec820 100644
--- a/contrib/gcc/c-objc-common.c
+++ b/contrib/gcc/c-objc-common.c
@@ -149,6 +149,14 @@ c_cannot_inline_tree_fn (fnp)
&& lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) == NULL)
return 1;
+ /* Don't auto-inline anything that might not be bound within
+ this unit of translation. */
+ if (!DECL_DECLARED_INLINE_P (fn) && flag_pic && TREE_PUBLIC (fn))
+ {
+ DECL_UNINLINABLE (fn) = 1;
+ return 1;
+ }
+
if (! function_attribute_inlinable_p (fn))
{
DECL_UNINLINABLE (fn) = 1;
OpenPOWER on IntegriCloud