From a415790e4b1e95908d5280efe64e17b1880a3650 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Mon, 20 Apr 2020 16:10:41 -0400 Subject: [PATCH 059/179] FIXME: more cleanups --- gcc/analyzer/region-model2.cc | 8 ++++++++ gcc/analyzer/region-model2.h | 1 + gcc/analyzer/store2.cc | 8 ++++++++ gcc/analyzer/store2.h | 1 + 4 files changed, 18 insertions(+) diff --git a/gcc/analyzer/region-model2.cc b/gcc/analyzer/region-model2.cc index cc506c08f75..d3b86bb4b28 100644 --- a/gcc/analyzer/region-model2.cc +++ b/gcc/analyzer/region-model2.cc @@ -2066,6 +2066,14 @@ map_region2::get_value_by_name (tree identifier, /* class frame_region2 : public map_region2. */ +frame_region2::~frame_region2 () +{ + for (map_t::iterator iter = m_locals.begin (); + iter != m_locals.end (); + ++iter) + delete (*iter).second; +} + void frame_region2::dump_to_pp (pretty_printer *pp, bool simple) const { diff --git a/gcc/analyzer/region-model2.h b/gcc/analyzer/region-model2.h index f6114b4bd4e..1dae5eca564 100644 --- a/gcc/analyzer/region-model2.h +++ b/gcc/analyzer/region-model2.h @@ -1005,6 +1005,7 @@ public: : scope_region2 (id, parent), m_calling_frame (calling_frame), m_fun (fun), m_depth (depth) {} + ~frame_region2 (); /* region2 vfuncs. */ enum kind get_kind () const FINAL OVERRIDE { return RK_FRAME; } diff --git a/gcc/analyzer/store2.cc b/gcc/analyzer/store2.cc index 2a342aa62b0..9aca20b586d 100644 --- a/gcc/analyzer/store2.cc +++ b/gcc/analyzer/store2.cc @@ -278,6 +278,14 @@ store2::store2 (const store2 &other) } } +store2::~store2 () +{ + for (cluster_map_t::iterator iter = m_cluster_map.begin (); + iter != m_cluster_map.end (); + ++iter) + delete (*iter).second; +} + bool store2::operator== (const store2 &other) const { diff --git a/gcc/analyzer/store2.h b/gcc/analyzer/store2.h index 8e05e2a7293..b7b086d149b 100644 --- a/gcc/analyzer/store2.h +++ b/gcc/analyzer/store2.h @@ -184,6 +184,7 @@ class store2 public: store2 (); store2 (const store2 &other); + ~store2 (); bool operator== (const store2 &other) const; bool operator!= (const store2 &other) const -- 2.21.0