OSDN Git Service

Rotate ChangeLogs.
[pf3gnuchains/gcc-fork.git] / gcc / vec.c
index 6563fd3..5b3b9a0 100644 (file)
--- a/gcc/vec.c
+++ b/gcc/vec.c
@@ -30,10 +30,10 @@ along with GCC; see the file COPYING3.  If not see
 #include "ggc.h"
 #include "vec.h"
 #include "coretypes.h"
-#include "toplev.h"
+#include "diagnostic-core.h"
 #include "hashtab.h"
 
-struct vec_prefix 
+struct vec_prefix
 {
   unsigned num;
   unsigned alloc;
@@ -190,10 +190,10 @@ calculate_allocation (const struct vec_prefix *pfx, int reserve, bool exact)
     /* If there's no prefix, and we've not requested anything, then we
        will create a NULL vector.  */
     return 0;
-  
+
   /* We must have run out of room.  */
   gcc_assert (alloc - num < (unsigned) reserve);
-  
+
   if (exact)
     /* Exact size.  */
     alloc = num + reserve;
@@ -208,7 +208,7 @@ calculate_allocation (const struct vec_prefix *pfx, int reserve, bool exact)
       else
        /* Grow slower when large.  */
        alloc = (alloc * 3 / 2);
-      
+
       /* If this is still too small, set it to the right size. */
       if (alloc < num + reserve)
        alloc = num + reserve;
@@ -227,20 +227,20 @@ vec_gc_o_reserve_1 (void *vec, int reserve, size_t vec_offset, size_t elt_size,
                    bool exact MEM_STAT_DECL)
 {
   struct vec_prefix *pfx = (struct vec_prefix *) vec;
-  unsigned alloc = alloc = calculate_allocation (pfx, reserve, exact);
-  
+  unsigned alloc = calculate_allocation (pfx, reserve, exact);
+
   if (!alloc)
     {
       if (pfx)
         ggc_free (pfx);
       return NULL;
     }
-  
+
   vec = ggc_realloc_stat (vec, vec_offset + alloc * elt_size PASS_MEM_STAT);
   ((struct vec_prefix *)vec)->alloc = alloc;
   if (!pfx)
     ((struct vec_prefix *)vec)->num = 0;
-  
+
   return vec;
 }
 
@@ -316,7 +316,7 @@ vec_heap_o_reserve_1 (void *vec, int reserve, size_t vec_offset,
   if (vec)
     free_overhead (pfx);
 #endif
-  
+
   vec = xrealloc (vec, vec_offset + alloc * elt_size);
   ((struct vec_prefix *)vec)->alloc = alloc;
   if (!pfx)
@@ -326,7 +326,7 @@ vec_heap_o_reserve_1 (void *vec, int reserve, size_t vec_offset,
     register_overhead ((struct vec_prefix *)vec,
                       vec_offset + alloc * elt_size PASS_MEM_STAT);
 #endif
-  
+
   return vec;
 }