]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: mangling cleanups
authorNathan Sidwell <nathan@acm.org>
Wed, 22 Jul 2020 14:52:31 +0000 (07:52 -0700)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 16:18:55 +0000 (13:18 -0300)
commit9c2349c0cd1fb6b6f0823098f27f9d9797e953fb
tree97148193f6e1a912fc3b1424c36304a0dcb365d2
parentae4c2c715b6ebbd39de2f454cb89206b21d8d4ec
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