c++: Small cleanup for do_type_instantiation
authorNathan Sidwell <nathan@acm.org>
Tue, 27 Oct 2020 15:48:26 +0000 (08:48 -0700)
committerNathan Sidwell <nathan@acm.org>
Tue, 27 Oct 2020 17:07:31 +0000 (10:07 -0700)
commit88f8b3dda534277feccb16ba055c01908db15873
tree09833d73c65c0d6ea4fe45d6453771ebc8dd03a9
parent0f801e0b6cc9f67c9a8983127e23161f6025c5b6
c++: Small cleanup for do_type_instantiation

In working on a bigger cleanup I noticed some opportunities to make
do_type_instantiation's control flow simpler.

gcc/cp/
* parser.c (cp_parser_explicit_instantiation): Refactor some RAII.
* pt.c (bt_instantiate_type_proc): DATA is the tree, pass type to
do_type_instantiation.
(do_type_instantiation): Require T to be a type.  Refactor for
some RAII.
gcc/cp/parser.c
gcc/cp/pt.c