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]

Remove varray_copy ()


This isn't used, either.  Is there any need to preserve it?

Ben

2004-11-02  Ben Elliston  <bje@au.ibm.com>

	* varray.h (varray_copy): Remove.
	* varray.c (varray_copy): Likewise.

Index: varray.h
===================================================================
RCS file: /home/bje/gcc-cvs/gcc/gcc/varray.h,v
retrieving revision 1.37
diff -u -p -r1.37 varray.h
--- varray.h	13 May 2004 06:39:52 -0000	1.37
+++ varray.h	2 Nov 2004 00:17:13 -0000
@@ -240,8 +240,6 @@ extern varray_type varray_grow (varray_t
 #define VARRAY_CLEAR(VA) varray_clear(VA)
 
 extern void varray_clear (varray_type);
-extern void varray_copy (varray_type v1, varray_type v2);
-
 extern void dump_varray_statistics (void);
 
 /* Check for VARRAY_xxx macros being in bound.  */
Index: varray.c
===================================================================
RCS file: /home/bje/gcc-cvs/gcc/gcc/varray.c,v
retrieving revision 1.29
diff -u -p -r1.29 varray.c
--- varray.c	16 Aug 2004 23:05:04 -0000	1.29
+++ varray.c	2 Nov 2004 00:17:13 -0000
@@ -218,25 +218,6 @@ varray_underflow (varray_type va, const 
 #endif
 
 
-/* Copy varray V2 into varray V1.  Both arrays must be the same size
-   and type.  */
-
-void
-varray_copy (varray_type v1, varray_type v2)
-{
-  size_t data_size;
-  
-  if (v1->type != v2->type)
-    abort ();
-
-  if (v1->num_elements != v2->num_elements)
-    abort ();
-
-  data_size = element[v2->type].size * v2->num_elements;
-  memcpy (v1->data.c, v2->data.c, data_size);
-  v1->elements_used = v2->elements_used;
-}
-
 /* Output per-varray statistics.  */
 #ifdef GATHER_STATISTICS
 


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