]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/alloc-pool.h
[Ada] Reuse Is_Package_Or_Generic_Package where possible
[thirdparty/gcc.git] / gcc / alloc-pool.h
index 81cb69e227abb593617fa53fc2f047fc1d979b3d..fd7194bfea423a2d959aa0d2d1209678252af2a8 100644 (file)
@@ -1,5 +1,5 @@
 /* Functions to support a pool of allocatable objects
-   Copyright (C) 1997-2018 Free Software Foundation, Inc.
+   Copyright (C) 1997-2020 Free Software Foundation, Inc.
    Contributed by Daniel Berlin <dan@cgsoftware.com>
 
 This file is part of GCC.
@@ -34,8 +34,9 @@ typedef unsigned long ALLOC_POOL_ID_TYPE;
 extern ALLOC_POOL_ID_TYPE last_id;
 
 /* Pool allocator memory usage.  */
-struct pool_usage: public mem_usage
+class pool_usage: public mem_usage
 {
+public:
   /* Default contructor.  */
   pool_usage (): m_element_size (0), m_pool_name ("") {}
   /* Constructor.  */
@@ -59,7 +60,7 @@ struct pool_usage: public mem_usage
 
   /* Dump usage coupled to LOC location, where TOTAL is sum of all rows.  */
   inline void
-  dump (mem_location *loc, mem_usage &total) const
+  dump (mem_location *loc, const mem_usage &total) const
   {
     char *location_string = loc->to_string ();
 
@@ -83,17 +84,14 @@ struct pool_usage: public mem_usage
   {
     fprintf (stderr, "%-32s%-48s %6s%11s%16s%17s%12s\n", "Pool name", name,
             "Pools", "Leak", "Peak", "Times", "Elt size");
-    print_dash_line ();
   }
 
   /* Dump footer.  */
   inline void
   dump_footer ()
   {
-    print_dash_line ();
     fprintf (stderr, "%s" PRsa(82) PRsa(10) "\n", "Total",
             SIZE_AMOUNT (m_instances), SIZE_AMOUNT (m_allocated));
-    print_dash_line ();
   }
 
   /* Element size.  */