cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.

* cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
	* decl.c (duplicate_decls): Adjust accordingly.
	(maybe_commonize_var): Likewise.
	(grokfndecl): Likewise.
	(start_function): Likewise.
	(start_method): Likewise.
	* decl2.c (key_method): Likewise.
	(import_export_decl): Likewise.
	* method.c (implicitly_declare_fn): Likewise.
	* optimize.c (maybe_clone_body): Likewise.

From-SVN: r41144
This commit is contained in:
Mark Mitchell 2001-04-06 06:33:07 +00:00 committed by Mark Mitchell
parent b03eced6f6
commit 79065db2d1
7 changed files with 38 additions and 18 deletions

View file

@ -1,3 +1,16 @@
2001-04-05 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
* decl.c (duplicate_decls): Adjust accordingly.
(maybe_commonize_var): Likewise.
(grokfndecl): Likewise.
(start_function): Likewise.
(start_method): Likewise.
* decl2.c (key_method): Likewise.
(import_export_decl): Likewise.
* method.c (implicitly_declare_fn): Likewise.
* optimize.c (maybe_clone_body): Likewise.
2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
* lang-specs.h: Add __DEPRECATED.

View file

@ -2981,7 +2981,7 @@ extern int flag_new_for_scope;
/* This function was declared inline. This flag controls the linkage
semantics of 'inline'; whether or not the function is inlined is
controlled by DECL_INLINE. */
#define DECL_THIS_INLINE(NODE) \
#define DECL_DECLARED_INLINE_P(NODE) \
(DECL_LANG_SPECIFIC (NODE)->decl_flags.declared_inline)
/* DECL_EXTERNAL must be set on a decl until the decl is actually emitted,

View file

@ -3409,7 +3409,8 @@ duplicate_decls (newdecl, olddecl)
}
}
if (DECL_THIS_INLINE (newdecl) && ! DECL_THIS_INLINE (olddecl)
if (DECL_DECLARED_INLINE_P (newdecl)
&& ! DECL_DECLARED_INLINE_P (olddecl)
&& TREE_ADDRESSABLE (olddecl) && warn_inline)
{
cp_warning ("`%#D' was used before it was declared inline",
@ -3664,7 +3665,7 @@ duplicate_decls (newdecl, olddecl)
SET_DECL_TEMPLATE_SPECIALIZATION (olddecl);
}
DECL_THIS_INLINE (newdecl) |= DECL_THIS_INLINE (olddecl);
DECL_DECLARED_INLINE_P (newdecl) |= DECL_DECLARED_INLINE_P (olddecl);
/* If either decl says `inline', this fn is inline, unless its
definition was passed already. */
@ -7566,7 +7567,7 @@ maybe_commonize_var (decl)
&& ! DECL_ARTIFICIAL (decl)
&& current_function_decl
&& DECL_CONTEXT (decl) == current_function_decl
&& (DECL_THIS_INLINE (current_function_decl)
&& (DECL_DECLARED_INLINE_P (current_function_decl)
|| DECL_TEMPLATE_INSTANTIATION (current_function_decl))
&& TREE_PUBLIC (current_function_decl))
{
@ -8834,7 +8835,7 @@ grokfndecl (ctype, type, declarator, orig_declarator, virtualp, flags, quals,
}
if (inlinep)
DECL_THIS_INLINE (decl) = DECL_INLINE (decl) = 1;
DECL_DECLARED_INLINE_P (decl) = DECL_INLINE (decl) = 1;
DECL_EXTERNAL (decl) = 1;
if (quals != NULL_TREE && TREE_CODE (type) == FUNCTION_TYPE)
@ -13526,7 +13527,7 @@ start_function (declspecs, declarator, attrs, flags)
if (DECL_NOT_REALLY_EXTERN (decl1))
DECL_EXTERNAL (decl1) = 0;
if (ctx != NULL_TREE && DECL_THIS_INLINE (ctx)
if (ctx != NULL_TREE && DECL_DECLARED_INLINE_P (ctx)
&& TREE_PUBLIC (ctx))
/* This is a function in a local class in an extern inline
function. */
@ -13539,12 +13540,14 @@ start_function (declspecs, declarator, attrs, flags)
&& (! DECL_TEMPLATE_INSTANTIATION (decl1)
|| flag_alt_external_templates))
{
if (DECL_THIS_INLINE (decl1) || DECL_TEMPLATE_INSTANTIATION (decl1)
if (DECL_DECLARED_INLINE_P (decl1)
|| DECL_TEMPLATE_INSTANTIATION (decl1)
|| processing_template_decl)
{
DECL_EXTERNAL (decl1)
= (interface_only
|| (DECL_THIS_INLINE (decl1) && ! flag_implement_inlines
|| (DECL_DECLARED_INLINE_P (decl1)
&& ! flag_implement_inlines
&& !DECL_VINDEX (decl1)));
/* For WIN32 we also want to put these in linkonce sections. */
@ -13575,7 +13578,8 @@ start_function (declspecs, declarator, attrs, flags)
So clear DECL_EXTERNAL. */
DECL_EXTERNAL (decl1) = 0;
if ((DECL_THIS_INLINE (decl1) || DECL_TEMPLATE_INSTANTIATION (decl1))
if ((DECL_DECLARED_INLINE_P (decl1)
|| DECL_TEMPLATE_INSTANTIATION (decl1))
&& ! DECL_INTERFACE_KNOWN (decl1)
/* Don't try to defer nested functions for now. */
&& ! decl_function_context (decl1))
@ -14091,7 +14095,7 @@ start_method (declspecs, declarator, attrlist)
check_template_shadow (fndecl);
DECL_THIS_INLINE (fndecl) = 1;
DECL_DECLARED_INLINE_P (fndecl) = 1;
if (flag_default_inline)
DECL_INLINE (fndecl) = 1;

View file

@ -2407,7 +2407,7 @@ key_method (type)
for (method = TYPE_METHODS (type); method != NULL_TREE;
method = TREE_CHAIN (method))
if (DECL_VINDEX (method) != NULL_TREE
&& ! DECL_THIS_INLINE (method)
&& ! DECL_DECLARED_INLINE_P (method)
&& (! DECL_PURE_VIRTUAL_P (method) || DECL_DESTRUCTOR_P (method)))
return method;
@ -2658,7 +2658,8 @@ import_export_decl (decl)
if ((DECL_IMPLICIT_INSTANTIATION (decl)
|| DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION (decl))
&& (flag_implicit_templates
|| (flag_implicit_inline_templates && DECL_THIS_INLINE (decl))))
|| (flag_implicit_inline_templates
&& DECL_DECLARED_INLINE_P (decl))))
{
if (!TREE_PUBLIC (decl))
/* Templates are allowed to have internal linkage. See
@ -2672,7 +2673,7 @@ import_export_decl (decl)
}
else if (DECL_FUNCTION_MEMBER_P (decl))
{
if (!DECL_THIS_INLINE (decl))
if (!DECL_DECLARED_INLINE_P (decl))
{
tree ctype = DECL_CONTEXT (decl);
import_export_class (ctype);
@ -2680,7 +2681,8 @@ import_export_decl (decl)
{
DECL_NOT_REALLY_EXTERN (decl)
= ! (CLASSTYPE_INTERFACE_ONLY (ctype)
|| (DECL_THIS_INLINE (decl) && ! flag_implement_inlines
|| (DECL_DECLARED_INLINE_P (decl)
&& ! flag_implement_inlines
&& !DECL_VINDEX (decl)));
/* Always make artificials weak. */
@ -2715,7 +2717,8 @@ import_export_decl (decl)
{
DECL_NOT_REALLY_EXTERN (decl)
= ! (CLASSTYPE_INTERFACE_ONLY (ctype)
|| (DECL_THIS_INLINE (decl) && ! flag_implement_inlines
|| (DECL_DECLARED_INLINE_P (decl)
&& ! flag_implement_inlines
&& !DECL_VINDEX (decl)));
/* Always make artificials weak. */

View file

@ -1032,7 +1032,7 @@ implicitly_declare_fn (kind, type, const_p)
DECL_ARTIFICIAL (fn) = 1;
DECL_NOT_REALLY_EXTERN (fn) = 1;
DECL_THIS_INLINE (fn) = 1;
DECL_DECLARED_INLINE_P (fn) = 1;
DECL_INLINE (fn) = 1;
defer_fn (fn);

View file

@ -1031,7 +1031,7 @@ maybe_clone_body (fn)
DECL_SOURCE_FILE (clone) = DECL_SOURCE_FILE (fn);
DECL_SOURCE_LINE (clone) = DECL_SOURCE_LINE (fn);
DECL_INLINE (clone) = DECL_INLINE (fn);
DECL_THIS_INLINE (clone) = DECL_THIS_INLINE (fn);
DECL_DECLARED_INLINE_P (clone) = DECL_DECLARED_INLINE_P (fn);
DECL_COMDAT (clone) = DECL_COMDAT (fn);
DECL_WEAK (clone) = DECL_WEAK (fn);
DECL_ONE_ONLY (clone) = DECL_ONE_ONLY (fn);

View file

@ -2450,7 +2450,7 @@ expand_body (fn)
/* Compute the appropriate object-file linkage for inline
functions. */
if (DECL_INLINE (fn))
if (DECL_DECLARED_INLINE_P (fn))
import_export_decl (fn);
/* Emit any thunks that should be emitted at the same time as FN. */