public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-1518] c++: simplify TEMPLATE_TEMPLATE_PARM hashing
@ 2023-06-03 13:27 Patrick Palka
0 siblings, 0 replies; only message in thread
From: Patrick Palka @ 2023-06-03 13:27 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:23bee8508816297a9b2ab81a96aa0c79ac88ceba
commit r14-1518-g23bee8508816297a9b2ab81a96aa0c79ac88ceba
Author: Patrick Palka <ppalka@redhat.com>
Date: Sat Jun 3 09:22:52 2023 -0400
c++: simplify TEMPLATE_TEMPLATE_PARM hashing
r10-7815-gaa576f2a860c82 added special hashing for TEMPLATE_TEMPLATE_PARM
to work around non-lowered ttps having TYPE_CANONICAL set but lowered
ttps did not. But ever since r13-737-gd0ef9e06197d14 this is no longer
the case, and all ttps should now have TYPE_CANONICAL set. So this
special hashing is now unnecessary and we can fall back to always using
TYPE_CANONICAL.
gcc/cp/ChangeLog:
* pt.cc (iterative_hash_template_arg): Don't hash
TEMPLATE_TEMPLATE_PARM specially.
Diff:
---
gcc/cp/pt.cc | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc
index 244b0b03454..dae3815f62a 100644
--- a/gcc/cp/pt.cc
+++ b/gcc/cp/pt.cc
@@ -1879,19 +1879,8 @@ iterative_hash_template_arg (tree arg, hashval_t val)
return hash_tmpl_and_args (TI_TEMPLATE (ti), TI_ARGS (ti));
}
- switch (TREE_CODE (arg))
+ switch (code)
{
- case TEMPLATE_TEMPLATE_PARM:
- {
- tree tpi = TEMPLATE_TYPE_PARM_INDEX (arg);
-
- /* Do not recurse with TPI directly, as that is unbounded
- recursion. */
- val = iterative_hash_object (TEMPLATE_PARM_LEVEL (tpi), val);
- val = iterative_hash_object (TEMPLATE_PARM_IDX (tpi), val);
- }
- break;
-
case DECLTYPE_TYPE:
val = iterative_hash_template_arg (DECLTYPE_TYPE_EXPR (arg), val);
break;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-06-03 13:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-03 13:27 [gcc r14-1518] c++: simplify TEMPLATE_TEMPLATE_PARM hashing Patrick Palka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).