[PATCH 07/41] Add ordered_hash_map

Jeff Law law@redhat.com
Fri Jan 10 16:29:00 GMT 2020


On Wed, 2020-01-08 at 04:02 -0500, David Malcolm wrote:
> Needs review.  This is used in many places in the analyzer.
> msebor made some comments about the v1 version of this patch here:
>   https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00231.html
> 
> Changed in v5:
> - updated copyright years to include 2020
> 
> This patch adds an ordered_hash_map template, which is similar to
> hash_map, but preserves insertion order.
> 
> gcc/ChangeLog:
> 	* Makefile.in (OBJS): Add ordered-hash-map-tests.o.
> 	* ordered-hash-map-tests.cc: New file.
> 	* ordered-hash-map.h: New file.
> 	* selftest-run-tests.c (selftest::run_tests): Call
> 	selftest::ordered_hash_map_tests_cc_tests.
> 	* selftest.h (selftest::ordered_hash_map_tests_cc_tests): New
> 	decl.
There's nothing inherent in the data that would preclude us from using
a standard container (ie, nothing with embedded GC based on our meeting
Tuesday).  But there isn't an existing standard container with the
right properties (based on email between you and Jon).  Right?

Do you need a private assignment operator?

Jeff

> 



More information about the Gcc-patches mailing list