c++: Template hash access
authorNathan Sidwell <nathan@acm.org>
Thu, 19 Nov 2020 21:18:09 +0000 (13:18 -0800)
committerNathan Sidwell <nathan@acm.org>
Thu, 19 Nov 2020 21:25:00 +0000 (13:25 -0800)
commit5bba2215c23d71ea08fb81656d93041229f7ea9c
treedb66443f05f6268c3fda4f83c6d718b9bb87fb0d
parent08b4d325711d5c6f68ac29443aba3fd7aa173ac8
c++: Template hash access

This exposes the template specialization table, so the modules
machinery may access it.  The hashed entity (tmpl, args & spec) is
available, along with a hash table walker.  We also need a way of
finding or inserting entries, along with some bookkeeping fns to deal
with the instantiation and (partial) specialization lists.

gcc/cp/
* cp-tree.h (struct spec_entry): Moved from pt.c.
(walk_specializations, match_mergeable_specialization)
(get_mergeable_specialization_flags)
(add_mergeable_specialization): Declare.
* pt.c (struct spec_entry): Moved to cp-tree.h.
(walk_specializations, match_mergeable_specialization)
(get_mergeable_specialization_flags)
(add_mergeable_specialization): New.
gcc/cp/cp-tree.h
gcc/cp/pt.c