From 6cda1c2bdb711d1d0ecbde30b5a1729d61a5ac6a Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Wed, 13 May 2020 14:50:39 -0400
Subject: [PATCH 126/159] FIXME: eliminate #ifdef-out print_fields

---
 gcc/analyzer/region-model2.cc | 68 -----------------------------------
 gcc/analyzer/region-model2.h  | 18 ----------
 2 files changed, 86 deletions(-)

diff --git a/gcc/analyzer/region-model2.cc b/gcc/analyzer/region-model2.cc
index 9d2a93ed400..7e166f7028f 100644
--- a/gcc/analyzer/region-model2.cc
+++ b/gcc/analyzer/region-model2.cc
@@ -1533,28 +1533,6 @@ region2::add_to_hash (inchash::hash &hstate) const
   hstate.add_ptr (m_type);
 }
 
-/* Base implementation of region2::print_fields vfunc.  */
-#if 0
-void
-region2::print_fields (const region_model2 &model ATTRIBUTE_UNUSED,
-		       pretty_printer *pp) const
-{
-  pp_printf (pp, "kind: %qs", region2_kind_to_str (get_kind ()));
-
-  pp_string (pp, ", parent: ");
-  m_parent_reg.print (pp);
-
-  pp_printf (pp, ", sval: ");
-  m_sval_id.print (pp);
-
-  if (m_type)
-    {
-      pp_printf (pp, ", type: ");
-      print_quoted_type (pp, m_type);
-    }
-}
-#endif
-
 /* FIXME.  */
 
 int
@@ -1744,17 +1722,6 @@ frame_region2::compare_fields (const frame_region2 &other) const
   return true;
 }
 
-/* Implementation of region2::print_fields vfunc for frame_region2.  */
-#if 0
-void
-frame_region2::print_fields (const region_model2 &model,
-			    pretty_printer *pp) const
-{
-  map_region2::print_fields (model, this_reg, pp);
-  pp_printf (pp, ", function: %qs, depth: %i", function_name (m_fun), m_depth);
-}
-#endif
-
 /* Implementation of region2::add_to_hash vfunc for frame_region2.  */
 #if 0
 void
@@ -1915,17 +1882,6 @@ stack_region2::compare_fields (const stack_region2 &other) const
 }
 #endif
 
-/* Implementation of region2::print_fields vfunc for stack_region2.  */
-#if 0
-void
-stack_region2::print_fields (const region_model2 &model,
-			    pretty_printer *pp) const
-{
-  region2::print_fields (model, this_reg, pp);
-  // TODO
-}
-#endif
-
 /* Implementation of region2::add_to_hash vfunc for stack_region2.  */
 #if 0
 void
@@ -2093,17 +2049,6 @@ root_region2::dump_to_pp (pretty_printer *pp, bool simple) const
     pp_string (pp, "root_region2()");
 }
 
-/* Implementation of region2::print_fields vfunc for root_region2.  */
-#if 0
-void
-root_region2::print_fields (const region_model2 &model,
-			   pretty_printer *pp) const
-{
-  region2::print_fields (model, this_reg, pp);
-  // TODO
-}
-#endif
-
 /* Implementation of region2::validate vfunc for root_region2.  */
 #if 0
 void
@@ -2389,19 +2334,6 @@ symbolic_region2::dump_to_pp (pretty_printer *pp, bool simple) const
     }
 }
 
-/* Implementation of region2::print_fields vfunc for symbolic_region2.  */
-
-#if 0
-void
-symbolic_region2::print_fields (const region_model2 &model,
-			       region2_id this_reg,
-			       pretty_printer *pp) const
-{
-  region2::print_fields (model, this_reg, pp);
-  pp_printf (pp, ", possibly_null: %s", m_possibly_null ? "true" : "false");
-}
-#endif
-
 /* class decl_region2 : public region2.  */
 
 void
diff --git a/gcc/analyzer/region-model2.h b/gcc/analyzer/region-model2.h
index bf81265c02c..ff66be580ee 100644
--- a/gcc/analyzer/region-model2.h
+++ b/gcc/analyzer/region-model2.h
@@ -917,10 +917,6 @@ public:
   region2 (unsigned id, const region2 *parent, tree type);
 
   virtual void add_to_hash (inchash::hash &hstate) const;
-#if 0
-  virtual void print_fields (const region_model2 &model,
-			     pretty_printer *pp) const;
-#endif
 
  private:
 #if 0
@@ -987,9 +983,6 @@ public:
   enum kind get_kind () const FINAL OVERRIDE { return RK_FRAME; }
   void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
 #if 0
-  void print_fields (const region_model2 &model,
-		     pretty_printer *pp) const
-    FINAL OVERRIDE;
   void add_to_hash (inchash::hash &hstate) const FINAL OVERRIDE;
 #endif
 
@@ -1197,9 +1190,6 @@ public:
  private:
 #if 0
   void add_to_hash (inchash::hash &hstate) const FINAL OVERRIDE;
-  void print_fields (const region_model2 &model,
-		     pretty_printer *pp) const
-    FINAL OVERRIDE;
 #endif
 
 #if 0
@@ -1306,9 +1296,6 @@ public:
 private:
 #if 0
   void add_to_hash (inchash::hash &hstate) const FINAL OVERRIDE;
-  void print_fields (const region_model2 &model,
-		     pretty_printer *pp) const
-    FINAL OVERRIDE;
 #endif
 
 #if 0
@@ -1353,11 +1340,6 @@ public:
 
   const svalue2 *get_pointer () const { return m_sval_ptr; }
 
-#if 0
-  void print_fields (const region_model2 &model,
-		     pretty_printer *pp) const FINAL OVERRIDE;
-#endif
-
 private:
   const svalue2 *m_sval_ptr;
 };
-- 
2.21.0

