analyzer: add class region_to_value_map
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 15 Jun 2021 13:30:18 +0000 (09:30 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Tue, 15 Jun 2021 13:30:18 +0000 (09:30 -0400)
commitd726a57b993e00294891e2a05d5868c89bb75b76
tree6aae516c3d3becfd020e896ab35e6172cc4a2fd2
parent954c9235297f2e63acacefd448bc5dabe039ea7c
analyzer: add class region_to_value_map

Add a class for associating symbolic values with regions, for use
initially for recording the sizes of dynamically-allocated regions,
though this also could potentially be used for e.g. tracking strlen()
values.

gcc/analyzer/ChangeLog:
* region-model.cc (region_to_value_map::operator=): New.
(region_to_value_map::operator==): New.
(region_to_value_map::dump_to_pp): New.
(region_to_value_map::dump): New.
(region_to_value_map::can_merge_with_p): New.
* region-model.h (class region_to_value_map): New class.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/analyzer/region-model.cc
gcc/analyzer/region-model.h