From 0918dec36c6b353351ca987c1d2c1e31e476350c Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Tue, 14 Apr 2020 09:08:04 -0400
Subject: [PATCH 028/132] FIXME: eliminate
 primitive_region2,struct_or_union_region2, struct_region2, union_region2, and
 array_region2

---
 gcc/analyzer/analyzer.h       |   1 -
 gcc/analyzer/region-model2.cc | 453 +---------------------------------
 gcc/analyzer/region-model2.h  | 231 -----------------
 3 files changed, 1 insertion(+), 684 deletions(-)

diff --git a/gcc/analyzer/analyzer.h b/gcc/analyzer/analyzer.h
index bad6e07f0ff..6087e0474b2 100644
--- a/gcc/analyzer/analyzer.h
+++ b/gcc/analyzer/analyzer.h
@@ -62,7 +62,6 @@ class svalue2;
   class setjmp_svalue2;
 class region2;
   class map_region2;
-  class array_region2;
   class symbolic_region2;
   class field_region2;
 class region_model2;
diff --git a/gcc/analyzer/region-model2.cc b/gcc/analyzer/region-model2.cc
index 1fc82fe6796..0d68fd920db 100644
--- a/gcc/analyzer/region-model2.cc
+++ b/gcc/analyzer/region-model2.cc
@@ -679,16 +679,6 @@ region2::kind_to_str (enum kind kind)
     {
     default:
       gcc_unreachable ();
-#if 0
-    case RK_PRIMITIVE:
-      return "primitive";
-    case RK_STRUCT:
-      return "struct";
-    case RK_UNION:
-      return "union";
-    case RK_ARRAY:
-      return "array";
-#endif
     case RK_FRAME:
       return "frame";
     case RK_GLOBALS:
@@ -744,42 +734,6 @@ region2::operator== (const region2 &other) const
     default:
       gcc_unreachable ();
 #if 0
-    case RK_PRIMITIVE:
-      {
-#if 1
-	return true;
-#else
-	const primitive_region2 &this_sub
-	  = (const primitive_region2 &)*this;
-	const primitive_region2 &other_sub
-	  = (const primitive_region2 &)other;
-	return this_sub.compare_fields (other_sub);
-#endif
-      }
-    case RK_STRUCT:
-      {
-	const struct_region2 &this_sub
-	  = (const struct_region2 &)*this;
-	const struct_region2 &other_sub
-	  = (const struct_region2 &)other;
-	return this_sub.compare_fields (other_sub);
-      }
-    case RK_UNION:
-      {
-	const union_region2 &this_sub
-	  = (const union_region2 &)*this;
-	const union_region2 &other_sub
-	  = (const union_region2 &)other;
-	return this_sub.compare_fields (other_sub);
-      }
-    case RK_ARRAY:
-      {
-	const array_region2 &this_sub
-	  = (const array_region2 &)*this;
-	const array_region2 &other_sub
-	  = (const array_region2 &)other;
-	return this_sub.compare_fields (other_sub);
-      }
     case RK_FRAME:
       {
 	const frame_region2 &this_sub
@@ -1102,35 +1056,14 @@ region_model2::copy_region2 (region2_id dst_reg, region2_id src_reg,
     return;
 
   /* Copy across child region2s for structs, unions, and arrays.  */
+  // FIXME
   switch (dst_reg->get_kind ())
     {
-    case RK_PRIMITIVE:
-      return;
-    case RK_STRUCT:
-      {
-	struct_region2 *dst_sub = as_a <struct_region2 *> (dst_reg);
-	struct_region2 *src_sub = as_a <struct_region2 *> (src_reg);
-	copy_struct_region2 (dst_reg, dst_sub, src_sub, ctxt);
-      }
-      return;
-    case RK_UNION:
-      {
-	union_region2 *src_sub = as_a <union_region2 *> (src_reg);
-	copy_union_region2 (dst_reg, src_sub, ctxt);
-      }
-      return;
     case RK_FRAME:
     case RK_GLOBALS:
     case RK_CODE:
     case RK_FUNCTION:
       return;
-    case RK_ARRAY:
-      {
-	array_region2 *dst_sub = as_a <array_region2 *> (dst_reg);
-	array_region2 *src_sub = as_a <array_region2 *> (src_reg);
-	copy_array_region2 (dst_reg, dst_sub, src_sub, ctxt);
-      }
-      return;
     case RK_STACK:
     case RK_HEAP:
     case RK_ROOT:
@@ -1138,67 +1071,6 @@ region_model2::copy_region2 (region2_id dst_reg, region2_id src_reg,
       return;
     }
 }
-
-/* Subroutine of region_model2::copy_region2 for copying the child
-   region2s for a struct.  */
-
-void
-region_model2::copy_struct_region2 (region2_id dst_reg,
-				  struct_region2 *dst_reg,
-				  struct_region2 *src_reg,
-				  region_model2_context *ctxt)
-{
-  for (map_region2::iterator_t iter = src_reg->begin ();
-       iter != src_reg->end (); ++iter)
-    {
-      tree src_key = (*iter).first;
-      region2_id src_field_reg = (*iter).second;
-      region2 *src_field_reg = get_region2 (src_field_reg);
-      region2_id dst_field_reg
-	= dst_reg->get_or_create (this, dst_reg, src_key,
-				  src_field_reg->get_type (), ctxt);
-      copy_region2 (dst_field_reg, src_field_reg, ctxt);
-    }
-}
-
-/* Subroutine of region_model2::copy_region2 for copying the active
-   child region2 for a union.  */
-
-void
-region_model2::copy_union_region2 (region2_id dst_reg,
-				 union_region2 *src_reg,
-				 region_model2_context *ctxt)
-{
-  region2_id src_active_view_reg = src_reg->get_active_view ();
-  if (src_active_view_reg.null_p ())
-    return;
-  region2 *src_active_view = get_region2 (src_active_view_reg);
-  tree type = src_active_view->get_type ();
-  region2_id dst_active_view_reg = get_or_create_view (dst_reg, type, ctxt);
-  copy_region2 (dst_active_view_reg, src_active_view_reg, ctxt);
-}
-
-/* Subroutine of region_model2::copy_region2 for copying the child
-   region2s for an array.  */
-
-void
-region_model2::copy_array_region2 (region2_id dst_reg,
-				 array_region2 *dst_reg,
-				 array_region2 *src_reg,
-				 region_model2_context *ctxt)
-{
-  for (array_region2::iterator_t iter = src_reg->begin ();
-       iter != src_reg->end (); ++iter)
-    {
-      array_region2::key_t src_key = (*iter).first;
-      region2_id src_field_reg = (*iter).second;
-      region2 *src_field_reg = get_region2 (src_field_reg);
-      region2_id dst_field_reg
-	= dst_reg->get_or_create (this, dst_reg, src_key,
-				  src_field_reg->get_type (), ctxt);
-      copy_region2 (dst_field_reg, src_field_reg, ctxt);
-    }
-}
 #endif
 
 /* Generate a hash value for this region2.  The work is done by the
@@ -1513,17 +1385,6 @@ region2::non_null_p (const region_model2 &model) const
 }
 #endif
 
-/* class primitive_region2 : public region2.  */
-
-/* Implementation of region2::clone vfunc for primitive_region2.  */
-#if 0
-region2 *
-primitive_region2::clone () const
-{
-  return new primitive_region2 (*this);
-}
-#endif
-
 /* class map_region2 : public region2.  */
 #if 0
 /* map_region2's copy ctor.  */
@@ -1975,58 +1836,6 @@ map_region2::get_value_by_name (tree identifier,
 }
 #endif
 
-/* class struct_or_union_region2 : public map_region2.  */
-
-#if 0
-/* Implementation of map_region2::valid_key_p vfunc for
-   struct_or_union_region2.  */
-
-bool
-struct_or_union_region2::valid_key_p (tree key) const
-{
-  return TREE_CODE (key) == FIELD_DECL;
-}
-
-/* Compare the fields of this struct_or_union_region2 with OTHER, returning
-   true if they are equal.
-   For use by region2::operator==.  */
-#if 0
-bool
-struct_or_union_region2::compare_fields (const struct_or_union_region2 &other)
-  const
-{
-  return map_region2::compare_fields (other);
-}
-#endif
-
-/* class struct_region2 : public struct_or_union_region2.  */
-
-/* Compare the fields of this struct_region2 with OTHER, returning true
-   if they are equal.
-   For use by region2::operator==.  */
-#if 0
-bool
-struct_region2::compare_fields (const struct_region2 &other) const
-{
-  return struct_or_union_region2::compare_fields (other);
-}
-#endif
-
-/* class union_region2 : public struct_or_union_region2.  */
-
-/* Compare the fields of this union_region2 with OTHER, returning true
-   if they are equal.
-   For use by region2::operator==.  */
-#if 0
-bool
-union_region2::compare_fields (const union_region2 &other) const
-{
-  return struct_or_union_region2::compare_fields (other);
-}
-#endif
-
-#endif
-
 /* class frame_region2 : public map_region2.  */
 
 /* Compare the fields of this frame_region2 with OTHER, returning true
@@ -2131,266 +1940,6 @@ code_region2::valid_key_p (tree key) const
   return TREE_CODE (key) == FUNCTION_DECL;
 }
 
-/* class array_region2 : public region2.  */
-
-#if 0
-
-/* array_region2's copy ctor.  */
-
-array_region2::array_region2 (const array_region2 &other)
-: region2 (other),
-  m_map (other.m_map)
-{
-}
-
-/* Get a child region2 for the element with index INDEX_SVAL.  */
-#if 0
-region2 *
-array_region2::get_element (region_model2 *model,
-			   svalue2_id index_sval,
-			   region_model2_context *ctxt)
-{
-  tree element_type = TREE_TYPE (get_type ());
-  svalue2 *index_sval = model->get_svalue2 (index_sval);
-  if (tree cst_index = index_sval->maybe_get_constant ())
-    {
-      key_t key = key_from_constant (cst_index);
-      region2_id element_reg
-	= get_or_create (model, this_reg, key, element_type, ctxt);
-      return element_reg;
-   }
-
-  return model->get_or_create_view (this_reg, element_type, ctxt);
-}
-#endif
-
-/* Compare the fields of this array_region2 with OTHER, returning true
-   if they are equal.
-   For use by region2::operator==.  */
-#if 0
-bool
-array_region2::compare_fields (const array_region2 &other) const
-{
-  if (m_map.elements () != other.m_map.elements ())
-    return false;
-
-  for (map_t::iterator iter = m_map.begin ();
-       iter != m_map.end ();
-       ++iter)
-    {
-      int key = (*iter).first;
-      region2_id e = (*iter).second;
-      region2_id *other_slot = const_cast <map_t &> (other.m_map).get (key);
-      if (other_slot == NULL)
-	return false;
-      if (e != *other_slot)
-	return false;
-    }
-  return true;
-}
-#endif
-
-/* Implementation of region2::print_fields vfunc for array_region2.  */
-#if 0
-void
-array_region2::print_fields (const region_model2 &model,
-			    pretty_printer *pp) const
-{
-  region2::print_fields (model, this_reg, pp);
-  pp_string (pp, ", array: {");
-  for (map_t::iterator iter = m_map.begin ();
-       iter != m_map.end ();
-       ++iter)
-    {
-      if (iter != m_map.begin ())
-	pp_string (pp, ", ");
-      int key = (*iter).first;
-      region2_id child_reg = (*iter).second;
-      pp_printf (pp, "[%i]: ", key);
-      child_reg.print (pp);
-    }
-  pp_string (pp, "}");
-}
-#endif
-
-/* Implementation of region2::validate vfunc for array_region2.  */
-#if 0
-void
-array_region2::validate (const region_model2 &model) const
-{
-  region2::validate (model);
-  for (map_t::iterator iter = m_map.begin ();
-       iter != m_map.end ();
-       ++iter)
-    {
-      region2_id child_reg = (*iter).second;
-      child_reg.validate (model);
-    }
-}
-#endif
-
-/* Implementation of region2::dump_dot_to_pp vfunc for array_region2.  */
-#if 0
-void
-array_region2::dump_dot_to_pp (const region_model2 &model,
-			      region2_id this_reg,
-			      pretty_printer *pp) const
-{
-  region2::dump_dot_to_pp (model, this_reg, pp);
-  for (map_t::iterator iter = m_map.begin ();
-       iter != m_map.end ();
-       ++iter)
-    {
-      // TODO: add nodes/edges to label things
-
-      int key = (*iter).first;
-      region2_id child_reg = (*iter).second;
-
-      pp_printf (pp, "rid_label_%i [label=\"", child_reg.as_int ());
-      pp_write_text_to_stream (pp);
-      pp_printf (pp, "%qi", key);
-      pp_write_text_as_dot_label_to_stream (pp, /*for_record=*/false);
-      pp_string (pp, "\"];");
-      pp_newline (pp);
-
-      pp_printf (pp, "rid_label_%i", child_reg.as_int ());
-      pp_string (pp, " -> ");
-      child_reg.dump_node_name_to_pp (pp);
-      pp_string (pp, ";");
-      pp_newline (pp);
-    }
-}
-
-/* Implementation of region2::dump_child_label vfunc for array_region2.  */
-
-void
-array_region2::dump_child_label (const region_model2 &model,
-			      region2_id this_reg,
-			      region2_id child_reg,
-			      pretty_printer *pp) const
-{
-  region2::dump_child_label (model, this_reg, child_reg, pp);
-
-  for (map_t::iterator iter = m_map.begin ();
-       iter != m_map.end ();
-       ++iter)
-    {
-      if (child_reg == (*iter).second)
-	{
-	  int key = (*iter).first;
-	  pp_printf (pp, "[%i]: ", key);
-	}
-    }
-}
-
-/* Look for a child region2 for KEY within this array_region2.
-   If it doesn't already exist, create a child array_region2, using TYPE for
-   its type.
-   Return the region2_id of the child (whether pre-existing, or
-   newly-created).
-   Notify CTXT if we don't know how to handle TYPE.  */
-
-region2_id
-array_region2::get_or_create (region_model2 *model,
-			     region2_id this_reg,
-			     key_t key,
-			     tree type,
-			     region_model2_context *ctxt)
-{
-  region2_id *slot = m_map.get (key);
-  if (slot)
-    return *slot;
-  region2_id child_reg = model->add_region2_for_type (this_reg, type, ctxt);
-  m_map.put (key, child_reg);
-  return child_reg;
-}
-#endif
-
-/* Get the region2 * for the child region2 for KEY within this
-   ARRAY_REGION2, or NULL if there is no such child region2.  */
-#if 0
-region2 **
-array_region2::get (key_t key)
-{
-  region2_id *slot = m_map.get (key);
-  return slot;
-}
-#endif
-
-/* Implementation of region2::add_to_hash vfunc for array_region2.  */
-#if 0
-void
-array_region2::add_to_hash (inchash::hash &hstate) const
-{
-  region2::add_to_hash (hstate);
-  // TODO
-}
-#endif
-
-/* Look for a child region2 with id CHILD_REG within this array_region2.
-   If one is found, write its key to *OUT and return true,
-   otherwise return false.  */
-#if 0
-bool
-array_region2::get_key_for_child_region2 (region2_id child_reg, key_t *out) const
-{
-  // TODO: do we want to store an inverse map?
-  for (map_t::iterator iter = m_map.begin ();
-       iter != m_map.end ();
-       ++iter)
-    {
-      key_t key = (*iter).first;
-      region2_id r = (*iter).second;
-      if (r == child_reg)
-	{
-	  *out = key;
-	  return true;
-	}
-    }
-
-  return false;
-}
-
-/* qsort comparator for array_region2's keys.  */
-
-int
-array_region2::key_cmp (const void *p1, const void *p2)
-{
-  key_t i1 = *(const key_t *)p1;
-  key_t i2 = *(const key_t *)p2;
-
-  if (i1 > i2)
-    return 1;
-  else if (i1 < i2)
-    return -1;
-  else
-    return 0;
-}
-#endif
-
-/* Convert constant CST into an array_region2::key_t.  */
-
-array_region2::key_t
-array_region2::key_from_constant (tree cst)
-{
-  gcc_assert (CONSTANT_CLASS_P (cst));
-  wide_int w = wi::to_wide (cst);
-  key_t result = w.to_shwi ();
-  return result;
-}
-
-/* Convert array_region2::key_t KEY into a tree constant.  */
-
-tree
-array_region2::constant_from_key (key_t key)
-{
-  tree array_type = get_type ();
-  tree index_type = TYPE_DOMAIN (array_type);
-  return build_int_cst (index_type, key);
-}
-
-#endif
-
 /* class function_region2 : public map_region2.  */
 
 /* Compare the fields of this function_region2 with OTHER, returning true
diff --git a/gcc/analyzer/region-model2.h b/gcc/analyzer/region-model2.h
index 81e8542c949..90ad9343a5d 100644
--- a/gcc/analyzer/region-model2.h
+++ b/gcc/analyzer/region-model2.h
@@ -499,17 +499,12 @@ public:
    than a struct_region.
 
    region
-     primitive_region (RK_PRIMITIVE)
      map_region
-       struct_or_union_region
-         struct_region (RK_STRUCT)
-         union_region (RK_UNION)
        scope_region
          frame_region (RK_FRAME)
          globals_region (RK_GLOBALS)
        code_region (RK_CODE)
        function_region (RK_FUNCTION)
-     array_region (RK_ARRAY)
      stack_region (RK_STACK)
      heap_region (RK_HEAP)
      root_region (RK_ROOT)
@@ -537,14 +532,10 @@ public:
      of region2.  */
   enum kind
   {
-   //RK_PRIMITIVE,
-   //RK_STRUCT,
-   //RK_UNION,
    RK_FRAME,
    RK_GLOBALS,
    RK_CODE,
    RK_FUNCTION,
-   //RK_ARRAY,
    RK_STACK,
    RK_HEAP,
    RK_ROOT,
@@ -565,7 +556,6 @@ public:
 
   virtual enum kind get_kind () const = 0;
   virtual map_region2 *dyn_cast_map_region2 () { return NULL; }
-  virtual array_region2 *dyn_cast_array_region2 () { return NULL; }
   virtual symbolic_region2 *dyn_cast_symbolic_region2 () { return NULL; }
   virtual const symbolic_region2 *dyn_cast_symbolic_region2 () const { return NULL; }
 
@@ -653,26 +643,6 @@ is_a_helper <region *>::test (region *)
 
 namespace ana {
 
-#if 0
-
-/* Concrete region subclass for storing "primitive" types (integral types,
-   pointers, etc).  */
-
-class primitive_region2 : public region2
-{
-public:
-  primitive_region2 (region2 *parent, tree type)
-  : region2 (parent, type)
-  {}
-
-#if 0
-  region2 *clone () const FINAL OVERRIDE;
-#endif
-
-  enum region2::kind get_kind () const FINAL OVERRIDE { return RK_PRIMITIVE; }
-};
-
-#endif
 /* A region2 that has children identified by tree keys.
    For example a stack frame has subregion2s per local, and a region2
    for a struct has subregion2s per field.  */
@@ -755,99 +725,6 @@ is_a_helper <map_region2 *>::test (region2 *reg)
   return (reg->dyn_cast_map_region2 () != NULL);
 }
 
-#if 0
-namespace ana {
-
-/* Abstract subclass representing a region2 with fields
-   (either a struct or a union).  */
-
-class struct_or_union_region2 : public map_region2
-{
-public:
-  bool valid_key_p (tree key) const FINAL OVERRIDE;
-
- protected:
-  struct_or_union_region2 (region2 *parent, tree type)
-  : map_region2 (parent, type)
-  {}
-};
-
-} // namespace ana
-
-template <>
-template <>
-inline bool
-is_a_helper <struct_or_union_region2 *>::test (region2 *reg)
-{
-  return (reg->get_kind () == region2::RK_STRUCT
-	  || reg->get_kind () == region2::RK_UNION);
-}
-
-namespace ana {
-
-/* Concrete region2 subclass.  A map_region2 representing a struct, using
-   FIELD_DECLs for its keys.  */
-
-class struct_region2 : public struct_or_union_region2
-{
-public:
-  struct_region2 (region2 *parent, tree type)
-  : struct_or_union_region2 (parent, type)
-  {
-    gcc_assert (TREE_CODE (type) == RECORD_TYPE);
-  }
-
-#if 0
-  region2 *clone () const FINAL OVERRIDE;
-#endif
-
-  enum kind get_kind () const FINAL OVERRIDE
-  { return region2::RK_STRUCT; }
-};
-
-} // namespace ana
-
-template <>
-template <>
-inline bool
-is_a_helper <struct_region2 *>::test (region2 *reg)
-{
-  return reg->get_kind () == region2::RK_STRUCT;
-}
-
-namespace ana {
-
-/* Concrete region2 subclass.  A map_region2 representing a union, using
-   FIELD_DECLs for its keys.  */
-
-class union_region2 : public struct_or_union_region2
-{
-public:
-  union_region2 (region2 *parent, tree type)
-  : struct_or_union_region2 (parent, type)
-  {
-    gcc_assert (TREE_CODE (type) == UNION_TYPE);
-  }
-
-#if 0
-  region2 *clone () const FINAL OVERRIDE;
-#endif
-
-  enum kind get_kind () const FINAL OVERRIDE { return RK_UNION; }
-};
-
-} // namespace ana
-
-template <>
-template <>
-inline bool
-is_a_helper <union_region2 *>::test (region2 *reg)
-{
-  return reg->get_kind () == region2::RK_UNION;
-}
-
-#endif
-
 namespace ana {
 
 /* Abstract map_region2 subclass for accessing decls, used as a base class
@@ -1046,114 +923,6 @@ is_a_helper <function_region2 *>::test (region2 *reg)
 #if 0
 namespace ana {
 
-/* Concrete region2 subclass representing an array (or an array-like view
-   of a parent region2 of memory.
-   This can't be a map_region2 as we can't use trees as the keys: there's
-   no guarantee about the uniqueness of an INTEGER_CST.  */
-
-class array_region2 : public region2
-{
-public:
-#if 0
-  wide_int m_test;
-
-  typedef wide_int key_t;
-  typedef int_hash <wide_int, -1, -2> hash_t;
-  typedef ordered_hash_map<hash_t, region2_id> map_t;
-#else
-  typedef int key_t;
-  typedef int_hash <int, -1, -2> int_hash_t;
-  typedef ordered_hash_map<int_hash_t, region2 *> map_t;
-#endif
-  typedef map_t::iterator iterator_t;
-
-  array_region2 (region2 *parent, tree type)
-  : region2 (parent, type)
-  {
-    gcc_assert (TREE_CODE (type) == ARRAY_TYPE);
-  }
-  array_region2 (const array_region2 &other);
-
-#if 0
-  void dump_dot_to_pp (const region_model2 &model,
-		       pretty_printer *pp) const
-    FINAL OVERRIDE;
-
-  void dump_child_label (const region_model2 &model,
-			 region2 *child,
-			 pretty_printer *pp) const
-    FINAL OVERRIDE;
-#endif
-
-  /* region2 vfuncs.  */
-#if 0
-  region2 *clone () const FINAL OVERRIDE;
-#endif
-  enum kind get_kind () const FINAL OVERRIDE { return RK_ARRAY; }
-  array_region2 *dyn_cast_array_region2 () { return this; }
-
-  region2 *get_element (region_model2 *model,
-			svalue2 *index,
-			region_model2_context *ctxt);
-
-  bool compare_fields (const array_region2 &other) const;
-#if 0
-  static bool can_merge_p (const array_region2 *array_region2_a,
-			   const array_region2 *array_region2_b,
-			   array_region2 *merged_array_region2,
-			   region2_id merged_rid,
-			   model_merger *merger);
-#endif
-
-  iterator_t begin () { return m_map.begin (); }
-  iterator_t end () { return m_map.end (); }
-  size_t elements () const { return m_map.elements (); }
-
-  region2 *get_or_create (region_model2 *model,
-			  key_t key, tree type,
-			  region_model2_context *ctxt);
-//  void unbind (int expr);
-  region2 *get (key_t key);
-
-  bool get_key_for_child_region2 (region2 *child,
-				 key_t *out) const;
-
-#if 0
-  bool get_key_for_child_region2 (region2 *child,
-				 const region_model2 &model,
-				 key_t *out) const;
-#endif
-
-#if 0
-  void add_to_hash (inchash::hash &hstate) const OVERRIDE;
-  void print_fields (const region_model2 &model,
-		     pretty_printer *pp) const
-    OVERRIDE;
-  void validate (const region_model2 &model) const FINAL OVERRIDE;
-#endif
-
-  static key_t key_from_constant (tree cst);
-  tree constant_from_key (key_t key);
-
- private:
-  static int key_cmp (const void *, const void *);
-
-  /* Mapping from tree to child region2.  */
-  map_t m_map;
-};
-
-} // namespace ana
-
-template <>
-template <>
-inline bool
-is_a_helper <array_region2 *>::test (region2 *reg)
-{
-  return reg->get_kind () == region2::RK_ARRAY;
-}
-
-namespace ana {
-
 /* Concrete region2 subclass representing a stack, containing all stack
    frames, and implicitly providing a POISON_KIND_UNINIT value to all
    child region2s by default.  */
-- 
2.21.0

