c++: mangling tweaks
commitbac21b7ea62bd3a7911e01cf803d6bf6516fbf7b
authorJason Merrill <jason@redhat.com>
Sun, 24 Sep 2023 14:33:00 +0000 (24 15:33 +0100)
committerJason Merrill <jason@redhat.com>
Tue, 17 Oct 2023 21:20:02 +0000 (17 17:20 -0400)
treefc614d1defba83ce75b76909897c579b868526bd
parent4f8700078c8e7d8b9c2022c77b0da007810deb0f
c++: mangling tweaks

Most of this is introducing the abi_check function to reduce the verbosity
of most places that check -fabi-version.

The start_mangling change is to avoid needing to zero-initialize additional
members of the mangling globals, though I'm not actually adding any.

The comment documents existing semantics.

gcc/cp/ChangeLog:

* mangle.cc (abi_check): New.
(write_prefix, write_unqualified_name, write_discriminator)
(write_type, write_member_name, write_expression)
(write_template_arg, write_template_param): Use it.
(start_mangling): Assign from {}.
* cp-tree.h: Update comment.
gcc/cp/cp-tree.h
gcc/cp/mangle.cc