aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2017-05-05 16:47:39 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2017-05-05 16:47:39 +0000
commit7187a6c83a466b582c68b60c33113492ce9ee1e9 (patch)
tree8c1edcc83e3f888d25f60e3c93955e9216cbca28
parent8e10223f3638a3251b15eb7a8777a69cbaf63422 (diff)
downloadgcc-7187a6c83a466b582c68b60c33113492ce9ee1e9.zip
gcc-7187a6c83a466b582c68b60c33113492ce9ee1e9.tar.gz
gcc-7187a6c83a466b582c68b60c33113492ce9ee1e9.tar.bz2
class.c (alter_class): Use retrofit_lang_decl directly.
* class.c (alter_class): Use retrofit_lang_decl directly. * decl.c (push_local_name, dupliate_decls): Likewise. * semantics.c (omp_privatize_field): Likewise. From-SVN: r247644
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/class.c3
-rw-r--r--gcc/cp/decl.c10
-rw-r--r--gcc/cp/semantics.c3
4 files changed, 9 insertions, 11 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 218e9c7..0bebb97 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,9 @@
2017-05-05 Nathan Sidwell <nathan@acm.org>
+ * class.c (alter_class): Use retrofit_lang_decl directly.
+ * decl.c (push_local_name, dupliate_decls): Likewise.
+ * semantics.c (omp_privatize_field): Likewise.
+
Kill walk_namespaces.
* cp-tree.h (walk_namespaces_fn, walk_namespaces): Delete.
* decl.c (walk_namespaces_r, walk_namespaces): Delete.
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 2b039fe..f610c77 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -1305,8 +1305,7 @@ alter_access (tree t, tree fdecl, tree access)
{
tree elem;
- if (!DECL_LANG_SPECIFIC (fdecl))
- retrofit_lang_decl (fdecl);
+ retrofit_lang_decl (fdecl);
gcc_assert (!DECL_DISCRIMINATOR_P (fdecl));
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index bd00bc3..e182e4f 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -961,8 +961,7 @@ push_local_name (tree decl)
t = (*local_names)[i];
if (DECL_NAME (t) == name)
{
- if (!DECL_LANG_SPECIFIC (decl))
- retrofit_lang_decl (decl);
+ retrofit_lang_decl (decl);
DECL_LANG_SPECIFIC (decl)->u.base.u2sel = 1;
if (DECL_DISCRIMINATOR_SET_P (t))
DECL_DISCRIMINATOR (decl) = DECL_DISCRIMINATOR (t) + 1;
@@ -1812,8 +1811,7 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
{
/* There is no explicit linkage-specification, so we use
the linkage from the previous declaration. */
- if (!DECL_LANG_SPECIFIC (newdecl))
- retrofit_lang_decl (newdecl);
+ retrofit_lang_decl (newdecl);
SET_DECL_LANGUAGE (newdecl, DECL_LANGUAGE (olddecl));
}
else
@@ -2124,9 +2122,7 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
&& CP_DECL_THREADPRIVATE_P (olddecl))
{
/* Allocate a LANG_SPECIFIC structure for NEWDECL, if needed. */
- if (!DECL_LANG_SPECIFIC (newdecl))
- retrofit_lang_decl (newdecl);
-
+ retrofit_lang_decl (newdecl);
CP_DECL_THREADPRIVATE_P (newdecl) = 1;
}
}
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index df94a03..b15763d 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -4478,8 +4478,7 @@ omp_privatize_field (tree t, bool shared)
if (v == NULL_TREE)
{
v = create_temporary_var (TREE_TYPE (m));
- if (!DECL_LANG_SPECIFIC (v))
- retrofit_lang_decl (v);
+ retrofit_lang_decl (v);
DECL_OMP_PRIVATIZED_MEMBER (v) = 1;
SET_DECL_VALUE_EXPR (v, m);
DECL_HAS_VALUE_EXPR_P (v) = 1;