The private mem_alloc_description::register_overhead overload is never
used, and it calls register_descriptor with five arguments, which no
overload accepts.  Compilers that check template member definitions
eagerly reject it.

gcc/ChangeLog:

        * mem-stats.h (mem_alloc_description::register_overhead): Remove
        the unused private overload.

Signed-off-by: Shiva <[email protected]>
---

Bootstrapped and regression-tested on x86_64-pc-linux-gnu and
aarch64-unknown-linux-gnu.  I do not have write access; please commit
if approved.

 gcc/mem-stats.h | 23 -----------------------
 1 file changed, 23 deletions(-)

diff --git a/gcc/mem-stats.h b/gcc/mem-stats.h
index dd83c919877..004972a4654 100644
--- a/gcc/mem-stats.h
+++ b/gcc/mem-stats.h
@@ -382,11 +382,6 @@ public:
   reverse_object_map_t *m_reverse_object_map;
 
 private:
-  /* Register overhead of SIZE bytes of ORIGIN type. PTR pointer is allocated
-     in NAME source file, at LINE in source code, in FUNCTION.  */
-  T *register_overhead (size_t size, mem_alloc_origin origin, const char *name,
-                       int line, const char *function, const void *ptr);
-
   /* Allocation location coupled to the description.  */
   mem_location m_location;
 
@@ -497,24 +492,6 @@ mem_alloc_description<T>::register_object_overhead (T 
*usage, size_t size,
   m_reverse_object_map->put (ptr, std::pair<T *, size_t> (usage, size));
 }
 
-/* Register overhead of SIZE bytes of ORIGIN type. PTR pointer is allocated
-   in NAME source file, at LINE in source code, in FUNCTION.  */
-
-template <class T>
-inline T*
-mem_alloc_description<T>::register_overhead (size_t size,
-                                            mem_alloc_origin origin,
-                                            const char *filename,
-                                            int line,
-                                            const char *function,
-                                            const void *ptr)
-{
-  T *usage = register_descriptor (ptr, origin, filename, line, function);
-  usage->register_overhead (size);
-
-  return usage;
-}
-
 /* Release PTR pointer of SIZE bytes.  */
 
 template <class T>

Reply via email to