]> git.ipfire.org Git - thirdparty/gcc.git/commit
analyzer: simplify sm_state_map lookup
authorDavid Malcolm <dmalcolm@redhat.com>
Mon, 24 Oct 2022 20:38:23 +0000 (16:38 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Mon, 24 Oct 2022 20:38:23 +0000 (16:38 -0400)
commit53881c47e4b3574e2cb2046a6cb154c87a9836b6
tree5ef483c2022f811ae72f22e7b73ab4a56959374c
parent792f039fc37faa3446725a643c8018f084e8ccab
analyzer: simplify sm_state_map lookup

gcc/analyzer/ChangeLog:
* engine.cc (impl_region_model_context::get_malloc_map): Replace
with...
(impl_region_model_context::get_state_map_by_name): ...this.
(impl_region_model_context::get_fd_map): Delete.
(impl_region_model_context::get_taint_map): Delete.
* exploded-graph.h (impl_region_model_context::get_fd_map):
Delete.
(impl_region_model_context::get_malloc_map): Delete.
(impl_region_model_context::get_taint_map): Delete.
(impl_region_model_context::get_state_map_by_name): New.
* region-model.h (region_model_context::get_state_map_by_name):
New vfunc.
(region_model_context::get_fd_map): Convert from vfunc to
function.
(region_model_context::get_malloc_map): Likewise.
(region_model_context::get_taint_map): Likewise.
(noop_region_model_context::get_state_map_by_name): New.
(noop_region_model_context::get_fd_map): Delete.
(noop_region_model_context::get_malloc_map): Delete.
(noop_region_model_context::get_taint_map): Delete.
(region_model_context_decorator::get_state_map_by_name): New.
(region_model_context_decorator::get_fd_map): Delete.
(region_model_context_decorator::get_malloc_map): Delete.
(region_model_context_decorator::get_taint_map): Delete.

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