This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[lto][patch] Drop TYPE_METHODS


TYPE_METHODS is not needed in lto1. Dropping it also drops some unused
function decls.

No regression on TOB. OK for it?

2008-10-23 Rafael Espindola  <espindola@google.com>

	* tree.c (reset_type_lang_specific): Set TYPE_METHODS of RECORD_TYPE to
	NULL_TREE.

Cheers,
-- 
Rafael Avila de Espindola

Google | Gordon House | Barrow Street | Dublin 4 | Ireland
Registered in Dublin, Ireland | Registration Number: 368047
diff --git a/gcc/tree.c b/gcc/tree.c
index c060c1b..5cc5595 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -3932,29 +3932,7 @@ reset_type_lang_specific (void **slot, void *unused ATTRIBUTE_UNUSED)
       else
 	TYPE_FIELDS (type) = NULL_TREE;
 
-      /* Likewise for TYPE_METHODS.  Remove any members that are not
-	 FUNCTION_DECLs.  FIXME lto, see similar note above for
-	 TYPE_FIELDS.  */
-      prev = NULL_TREE;
-      member = TYPE_METHODS (type);
-      while (member)
-	{
-	  if (TREE_CODE (member) == FUNCTION_DECL)
-	    {
-	      if (prev)
-		TREE_CHAIN (prev) = member;
-	      else
-		TYPE_METHODS (type) = member;
-	      prev = member;
-	    }
-
-	  member = TREE_CHAIN (member);
-	}
-
-      if (prev)
-	TREE_CHAIN (prev) = NULL_TREE;
-      else
-	TYPE_METHODS (type) = NULL_TREE;
+      TYPE_METHODS (type)  = NULL_TREE;
     }
 
   if (TREE_CODE (type) == INTEGER_TYPE)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]