diff mbox series

Free TYPE_VFIELD in free_lang_data

Message ID 20180621112038.GE84841@kam.mff.cuni.cz
State New
Headers show
Series Free TYPE_VFIELD in free_lang_data | expand

Commit Message

Jan Hubicka June 21, 2018, 11:20 a.m. UTC
Hi,
this patch frees TYPE_VFIELD which is used only for debug info generation.
Bootstrapped/regtested x86_64-linux, OK?

Honza

	* tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.

Comments

Richard Biener June 21, 2018, 11:47 a.m. UTC | #1
On Thu, 21 Jun 2018, Jan Hubicka wrote:

> Hi,
> this patch frees TYPE_VFIELD which is used only for debug info generation.
> Bootstrapped/regtested x86_64-linux, OK?

OK.

Richard.

> Honza
> 
> 	* tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
> Index: tree.c
> ===================================================================
> --- tree.c	(revision 261841)
> +++ tree.c	(working copy)
> @@ -5134,10 +5134,7 @@ free_lang_data_in_type (tree type)
>  	else
>  	  *prev = DECL_CHAIN (member);
>  
> -      /* FIXME: C FE uses TYPE_VFIELD to record C_TYPE_INCOMPLETE_VARS
> - 	 and danagle the pointer from time to time.  */
> -      if (TYPE_VFIELD (type) && TREE_CODE (TYPE_VFIELD (type)) != FIELD_DECL)
> -        TYPE_VFIELD (type) = NULL_TREE;
> +      TYPE_VFIELD (type) = NULL_TREE;
>  
>        if (TYPE_BINFO (type))
>  	{
diff mbox series

Patch

Index: tree.c
===================================================================
--- tree.c	(revision 261841)
+++ tree.c	(working copy)
@@ -5134,10 +5134,7 @@  free_lang_data_in_type (tree type)
 	else
 	  *prev = DECL_CHAIN (member);
 
-      /* FIXME: C FE uses TYPE_VFIELD to record C_TYPE_INCOMPLETE_VARS
- 	 and danagle the pointer from time to time.  */
-      if (TYPE_VFIELD (type) && TREE_CODE (TYPE_VFIELD (type)) != FIELD_DECL)
-        TYPE_VFIELD (type) = NULL_TREE;
+      TYPE_VFIELD (type) = NULL_TREE;
 
       if (TYPE_BINFO (type))
 	{