aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2001-04-06 06:33:07 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2001-04-06 06:33:07 +0000
commit79065db2d1a2faad16bd046fcd02812e6259a27a (patch)
tree79c3ec5ac8a7cfa8fe8b7c1d0050e9298f12ece2 /gcc/cp
parentb03eced6f6609e6e2a6b160a705d79a4ebb0eb2f (diff)
downloadgcc-79065db2d1a2faad16bd046fcd02812e6259a27a.zip
gcc-79065db2d1a2faad16bd046fcd02812e6259a27a.tar.gz
gcc-79065db2d1a2faad16bd046fcd02812e6259a27a.tar.bz2
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
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog13
-rw-r--r--gcc/cp/cp-tree.h2
-rw-r--r--gcc/cp/decl.c22
-rw-r--r--gcc/cp/decl2.c13
-rw-r--r--gcc/cp/method.c2
-rw-r--r--gcc/cp/optimize.c2
-rw-r--r--gcc/cp/semantics.c2
7 files changed, 38 insertions, 18 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index c08d243..2f3c032 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 6a7a9ca..77a12f6 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -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,
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 58844cb..ff8a819 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -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;
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 38db639..b26decb 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -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. */
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index c7e3613..7c55fd8 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -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);
diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c
index 8f47768..5232491 100644
--- a/gcc/cp/optimize.c
+++ b/gcc/cp/optimize.c
@@ -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);
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index ced8c51..4792b34 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -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. */