-/* We want to inline `extern inline' functions even if this would
- violate inlining limits. Some glibc and linux constructs depend on
- such functions always being inlined when optimizing. */
-
-int
-c_disregard_inline_limits (tree fn)
-{
- if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) != NULL)
- return 1;
-
- return (!flag_really_no_inline && DECL_DECLARED_INLINE_P (fn)
- && DECL_EXTERNAL (fn));
-}
-
-int
-c_cannot_inline_tree_fn (tree *fnp)
-{
- tree fn = *fnp;
- bool do_warning = (warn_inline
- && DECL_INLINE (fn)
- && DECL_DECLARED_INLINE_P (fn)
- && !DECL_IN_SYSTEM_HEADER (fn));
-
- if (flag_really_no_inline
- && lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) == NULL)
- {
- if (do_warning)
- warning (0, "function %q+F can never be inlined because it "
- "is suppressed using -fno-inline", fn);
- goto cannot_inline;
- }
-
- /* Don't auto-inline anything that might not be bound within
- this unit of translation. */
- if (!DECL_DECLARED_INLINE_P (fn) && !targetm.binds_local_p (fn))
- {
- if (do_warning)
- warning (0, "function %q+F can never be inlined because it might not "
- "be bound within this unit of translation", fn);
- goto cannot_inline;
- }
-
- if (!function_attribute_inlinable_p (fn))
- {
- if (do_warning)
- warning (0, "function %q+F can never be inlined because it uses "
- "attributes conflicting with inlining", fn);
- goto cannot_inline;
- }
-
- return 0;
-
- cannot_inline:
- DECL_UNINLINABLE (fn) = 1;
- return 1;
-}
-