]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: use hash_set in nrv_data
authorJason Merrill <jason@redhat.com>
Thu, 2 Nov 2023 03:21:34 +0000 (23:21 -0400)
committerJason Merrill <jason@redhat.com>
Thu, 2 Nov 2023 20:01:39 +0000 (16:01 -0400)
commit341c633bd8ce4e4a82038873606c6b32e94ae339
treecc0b57149ce3a51c192f5c609f99ab4f5b409884
parentae07265381d934ee97fb1ce8915731158c91babc
c++: use hash_set in nrv_data

I noticed we were using a hash_table directly here instead of the simpler
hash_set interface.  Also, let's check for the variable itself and repeats
earlier, since they should happen more often than any of the other cases.

gcc/cp/ChangeLog:

* semantics.cc (nrv_data): Change visited to hash_set.
(finalize_nrv_r): Reorganize.
gcc/cp/semantics.cc