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]

[patch] tree.c: Remove hash_chainon.


Hi,

Attached is a patch to remove hash_chainon as it is unused.

AFAICT, the function has been unused ever since GCC was imported into
CVS, so it's been unused for more than 7 yeaers(!).

Bootstrapped on i686-pc-linux-gnu.  OK to apply?

Kazu Hirata

2005-01-16  Kazu Hirata  <kazu@cs.umass.edu>

	* tree.c (hash_chainon): Remove.
	* cp-tree.h: Remove the corresponding prototypes.

Index: cp-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v
retrieving revision 1.1088
diff -u -d -p -r1.1088 cp-tree.h
--- cp-tree.h	10 Jan 2005 19:37:05 -0000	1.1088
+++ cp-tree.h	16 Jan 2005 10:43:58 -0000
@@ -4245,7 +4245,6 @@ extern tree build_cplus_staticfn_type		(
 extern tree build_cplus_array_type		(tree, tree);
 extern tree hash_tree_cons			(tree, tree, tree);
 extern tree hash_tree_chain			(tree, tree);
-extern tree hash_chainon			(tree, tree);
 extern int count_functions			(tree);
 extern int is_overloaded_fn			(tree);
 extern tree get_first_fn			(tree);
Index: tree.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/tree.c,v
retrieving revision 1.422
diff -u -d -p -r1.422 tree.c
--- tree.c	1 Jan 2005 01:43:12 -0000	1.422
+++ tree.c	16 Jan 2005 10:44:00 -0000
@@ -736,21 +736,6 @@ hash_tree_chain (tree value, tree chain)
 {
   return hash_tree_cons (NULL_TREE, value, chain);
 }
-
-/* Similar, but used for concatenating two lists.  */
-
-tree
-hash_chainon (tree list1, tree list2)
-{
-  if (list2 == 0)
-    return list1;
-  if (list1 == 0)
-    return list2;
-  if (TREE_CHAIN (list1) == NULL_TREE)
-    return hash_tree_chain (TREE_VALUE (list1), list2);
-  return hash_tree_chain (TREE_VALUE (list1),
-			  hash_chainon (TREE_CHAIN (list1), list2));
-}
 
 void
 debug_binfo (tree elem)


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