diff mbox series

[OBVIOUS] Use more ggc_delete.

Message ID 57a0ac8e-9003-364e-3255-00d5d5a53e0f@suse.cz
State New
Headers show
Series [OBVIOUS] Use more ggc_delete. | expand

Commit Message

Martin Liška Nov. 5, 2019, 12:44 p.m. UTC
Hi.

It's a small refactoring patch that I've just tested.

Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

I'm going to install the patch.
Thanks,
Martin

gcc/ChangeLog:

2019-11-05  Martin Liska  <mliska@suse.cz>

	* symbol-summary.h: Use ggc_delete.
---
  gcc/symbol-summary.h | 10 ++--------
  1 file changed, 2 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/gcc/symbol-summary.h b/gcc/symbol-summary.h
index 8aedcfe9143..a5e20e547a1 100644
--- a/gcc/symbol-summary.h
+++ b/gcc/symbol-summary.h
@@ -69,10 +69,7 @@  protected:
   void release (T *item)
   {
     if (is_ggc ())
-      {
-	item->~T ();
-	ggc_free (item);
-      }
+      ggc_delete (item);
     else
       m_allocator.remove (item);
   }
@@ -562,10 +559,7 @@  protected:
   void release (T *item)
   {
     if (is_ggc ())
-      {
-	item->~T ();
-	ggc_free (item);
-      }
+      ggc_delete (item);
     else
       m_allocator.remove (item);
   }