c++: mangling cleanups
authorNathan Sidwell <nathan@acm.org>
Wed, 22 Jul 2020 14:52:31 +0000 (07:52 -0700)
committerNathan Sidwell <nathan@acm.org>
Wed, 22 Jul 2020 15:43:24 +0000 (08:43 -0700)
commit5980c0dcc6b3c2bb2f01f2140f48beb3fe3ffee6
tree025af8b0125ae8528833746bd714485d51fdb8c7
parent748ada0acb6fd746207aaff23a468717eee06555
c++: mangling cleanups

I noticed the mangler's handling of templates could be simplified.
We know template_info is non-null, which is sufficiently boolean --
no need for an explicit bool return.  also some of the internals of
template_args_equal had crept into find_substitution.  Let's not do
that.

gcc/cp/
* mangle.c (decl_is_template_id): Rename to ...
(maybe_template_info): ... here.  Return the template info,
rather than use a pointer.  Adjust all callers.
(find_substitution): Use template_args_equal, rather than
local check.
gcc/cp/mangle.c