aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/module.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/module.cc')
-rw-r--r--gcc/cp/module.cc24
1 files changed, 17 insertions, 7 deletions
diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc
index e0b9efa..e9cacf1 100644
--- a/gcc/cp/module.cc
+++ b/gcc/cp/module.cc
@@ -8996,11 +8996,14 @@ trees_in::decl_value ()
dump (dumper::TREE) && dump ("CDTOR %N is %scloned",
decl, cloned_p ? "" : "not ");
if (cloned_p)
- build_cdtor_clones (decl, flags & 2, flags & 4,
- /* Update the member vec, if there is
- one (we're in a different cluster
- to the class defn). */
- CLASSTYPE_MEMBER_VEC (DECL_CONTEXT (decl)));
+ {
+ /* Update the member vec, if there is one (we're in a different
+ cluster to the class defn) and this isn't a primary template
+ specialization (as in tsubst_function_decl). */
+ bool up = (CLASSTYPE_MEMBER_VEC (DECL_CONTEXT (decl))
+ && !primary_template_specialization_p (decl));
+ build_cdtor_clones (decl, flags & 2, flags & 4, up);
+ }
}
}
@@ -17246,13 +17249,16 @@ module_state::write_namespaces (elf_out *to, vec<depset *> spaces,
flags |= 4;
if (DECL_MODULE_EXPORT_P (ns))
flags |= 8;
+ if (TREE_DEPRECATED (ns))
+ flags |= 16;
dump () && dump ("Writing namespace:%u %N%s%s%s%s",
b->cluster, ns,
flags & 1 ? ", public" : "",
flags & 2 ? ", inline" : "",
flags & 4 ? ", purview" : "",
- flags & 8 ? ", export" : "");
+ flags & 8 ? ", export" : "",
+ flags & 16 ? ", deprecated" : "");
sec.u (b->cluster);
sec.u (to->name (DECL_NAME (ns)));
write_namespace (sec, b->deps[0]);
@@ -17328,7 +17334,8 @@ module_state::read_namespaces (unsigned num)
flags & 1 ? ", public" : "",
flags & 2 ? ", inline" : "",
flags & 4 ? ", purview" : "",
- flags & 8 ? ", export" : "");
+ flags & 8 ? ", export" : "",
+ flags & 16 ? ", deprecated" : "");
bool visible_p = ((flags & 8)
|| ((flags & 1)
&& (flags & 4)
@@ -17349,6 +17356,9 @@ module_state::read_namespaces (unsigned num)
DECL_MODULE_EXPORT_P (inner) = true;
}
+ if (flags & 16)
+ TREE_DEPRECATED (inner) = true;
+
if (tags)
DECL_ATTRIBUTES (inner)
= tree_cons (get_identifier ("abi_tag"), tags, DECL_ATTRIBUTES (inner));