for (method = TYPE_FIELDS (type); method; method = DECL_CHAIN (method))
if (TREE_CODE (method) == FUNCTION_DECL
&& DECL_VINDEX (method) != NULL_TREE
- && (! DECL_DECLARED_INLINE_P (method)
- /* [[gnu::gnu_inline]] virtual inline/constexpr methods will
- have out of line bodies emitted in some other TU and so
- those can be key methods and vtable emitted in the TU with
- the actual out of line definition. */
- || lookup_attribute ("gnu_inline", DECL_ATTRIBUTES (method)))
+ /* [[gnu::gnu_inline]] virtual inline/constexpr methods will
+ have out of line bodies emitted in some other TU and so
+ those can be key methods and vtable emitted in the TU with
+ the actual out of line definition. */
+ && ! DECL_NONGNU_INLINE_P (method)
&& ! DECL_PURE_VIRTUAL_P (method))
{
SET_CLASSTYPE_KEY_METHOD (type, method);
#define DECL_PENDING_INLINE_INFO(NODE) \
(LANG_DECL_FN_CHECK (NODE)->u.pending_inline_info)
+/* True if NODE is a non-gnu_inline inline function; gnu_inline overrides the
+ usual vague linkage effects of inline. */
+#define DECL_NONGNU_INLINE_P(NODE) \
+ (DECL_DECLARED_INLINE_P (NODE) \
+ && !lookup_attribute ("gnu_inline", DECL_ATTRIBUTES (NODE)))
+
/* Nonzero for TYPE_DECL means that it was written 'using name = type'. */
#define TYPE_DECL_ALIAS_P(NODE) \
DECL_LANG_FLAG_6 (TYPE_DECL_CHECK (NODE))
SET_DECL_TEMPLATE_SPECIALIZATION (olddecl);
DECL_COMDAT (newdecl) = (TREE_PUBLIC (newdecl)
- && DECL_DECLARED_INLINE_P (newdecl));
+ && DECL_NONGNU_INLINE_P (newdecl));
/* Don't propagate visibility from the template to the
specialization here. We'll do that in determine_visibility if
SET_DECL_TEMPLATE_SPECIALIZATION (decl);
if (TREE_CODE (decl) == FUNCTION_DECL)
DECL_COMDAT (decl) = (TREE_PUBLIC (decl)
- && DECL_DECLARED_INLINE_P (decl));
+ && DECL_NONGNU_INLINE_P (decl));
else
DECL_COMDAT (decl) = false;
DECL_COMDAT. */
if (DECL_COMDAT (decl)
|| (TREE_CODE (decl) == FUNCTION_DECL
- && DECL_DECLARED_INLINE_P (decl))
+ && DECL_NONGNU_INLINE_P (decl))
|| (DECL_LANG_SPECIFIC (decl)
&& DECL_TEMPLOID_INSTANTIATION (decl))
|| (VAR_P (decl) && DECL_INLINE_VAR_P (decl)))
translation units. If we were to emit the vtable in each
translation unit containing a definition, we would get
multiple definition errors at link-time. */
- if (method && (flag_weak || ! DECL_DECLARED_INLINE_P (method)))
+ if (method && (flag_weak || ! DECL_NONGNU_INLINE_P (method)))
import_export = (DECL_REALLY_EXTERN (method) ? -1 : 1);
}
}
object for the TU containing the definition of the key function. This is
unique if the key function is not inline. */
tree key_method = CLASSTYPE_KEY_METHOD (ctype);
- if (key_method && !DECL_DECLARED_INLINE_P (key_method))
+ if (key_method && !DECL_NONGNU_INLINE_P (key_method))
return true;
/* Otherwise, the tables are emitted in every object that references
}
else if (TREE_CODE (decl) == FUNCTION_DECL && DECL_FUNCTION_MEMBER_P (decl))
{
- if (!DECL_DECLARED_INLINE_P (decl))
+ if (!DECL_NONGNU_INLINE_P (decl))
{
tree ctype = DECL_CONTEXT (decl);
import_export_class (ctype);