From 6a9f01cd888db0dffb83fbabc21bfe9881819785 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Fri, 10 Jul 2020 11:27:30 -0400 Subject: [PATCH 298/315] FIXME: introduce binding_cluster2::bind_key --- gcc/analyzer/store2.cc | 19 ++++++++++++++----- gcc/analyzer/store2.h | 1 + 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/gcc/analyzer/store2.cc b/gcc/analyzer/store2.cc index e44c4ef95bb..a9b6bcf24e9 100644 --- a/gcc/analyzer/store2.cc +++ b/gcc/analyzer/store2.cc @@ -448,8 +448,19 @@ binding_cluster2::bind (store2_manager *mgr, } const binding_key2 *binding = binding_key2::make (mgr, reg, kind); - m_map.put (binding, sval); - if (binding->symbolic_p ()) + bind_key (binding, sval); +} + +/* FIXME. */ + +void +binding_cluster2::bind_key (const binding_key2 *key, const svalue2 *sval) +{ + /* Unpacking of compound_svalue2 should have been done by now. */ + gcc_assert (sval->get_kind () != svalue2::SK_COMPOUND); + + m_map.put (key, sval); + if (key->symbolic_p ()) m_touched = true; } @@ -490,12 +501,10 @@ binding_cluster2::bind_compound_sval (store2_manager *mgr, = mgr->get_concrete_binding (effective_start, concrete_key->get_size_in_bits (), iter_key->get_kind ()); - m_map.put (effective_concrete_key, iter_sval); + bind_key (effective_concrete_key, iter_sval); } else gcc_unreachable (); // TODO - if (iter_key->symbolic_p ()) - m_touched = true; } } diff --git a/gcc/analyzer/store2.h b/gcc/analyzer/store2.h index d392e2490dc..4a1b29df870 100644 --- a/gcc/analyzer/store2.h +++ b/gcc/analyzer/store2.h @@ -422,6 +422,7 @@ private: void bind_compound_sval (store2_manager *mgr, const region2 *reg, const compound_svalue2 *compound_sval); + void bind_key (const binding_key2 *key, const svalue2 *sval); const region2 *m_base_region; -- 2.26.2