diff options
author | Nathan Sidwell <nathan@acm.org> | 2020-07-22 12:00:02 -0700 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2020-07-27 13:13:32 -0700 |
commit | b95eba48a1a25284ce7385bbfa0ee733124cb84b (patch) | |
tree | 4c1b9723d3886d37b903f94928dc2ac40c7ba65e /gcc/cp/decl.c | |
parent | 07bd5544a3ab3a04d1652dbcb5a09d7271a9706a (diff) | |
download | gcc-b95eba48a1a25284ce7385bbfa0ee733124cb84b.zip gcc-b95eba48a1a25284ce7385bbfa0ee733124cb84b.tar.gz gcc-b95eba48a1a25284ce7385bbfa0ee733124cb84b.tar.bz2 |
c++: Name as_base type
The as-base type never got a name. For modules I needed to give it a
name to serialize properly, and it's useful when debugging the
compiler, so we may as well have it on trunk. There's also a bug
where its fields can have NSDMIs from the main class. This happens to
be silent on trunk, but can be a GC leak where we retain a deferred
parse node there. (On modules it blows up, because we're not prepared
to serialize deferred parse nodes, as they should never survive
parsing.
gcc/cp/
* cp-tree.h (enum cp_tree_index): Add CPTI_AS_BASE_IDENTIFIER.
(as_base_identifier): Define.
* decl.c (initialize_predifined_identifiers): Initialize as_base
identifier.
* class.c (layout_class_type): Name the as-base type. Zap
NSDMI its fields may have.
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index de53a7b..385b1f3 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -4202,6 +4202,7 @@ initialize_predefined_identifiers (void) {"__dt_del ", &deleting_dtor_identifier, cik_dtor}, {"__conv_op ", &conv_op_identifier, cik_conv_op}, {"__in_chrg", &in_charge_identifier, cik_normal}, + {"__as_base ", &as_base_identifier, cik_normal}, {"this", &this_identifier, cik_normal}, {"__delta", &delta_identifier, cik_normal}, {"__pfn", &pfn_identifier, cik_normal}, |