diff options
Diffstat (limited to 'gcc/vec.h')
-rw-r--r-- | gcc/vec.h | 40 |
1 files changed, 8 insertions, 32 deletions
diff --git a/gcc/vec.h b/gcc/vec.h index 7b9697922ad..61a61894076 100644 --- a/gcc/vec.h +++ b/gcc/vec.h @@ -22,38 +22,14 @@ along with GCC; see the file COPYING3. If not see #ifndef GCC_VEC_H #define GCC_VEC_H -/* FIXME - When compiling some of the gen* binaries, we cannot enable GC - support because the headers generated by gengtype are still not - present. In particular, the header file gtype-desc.h is missing, - so compilation may fail if we try to include ggc.h. - - Since we use some of those declarations, we need to provide them - (even if the GC-based templates are not used). This is not a - problem because the code that runs before gengtype is built will - never need to use GC vectors. But it does force us to declare - these functions more than once. */ -#ifdef GENERATOR_FILE -#define VEC_GC_ENABLED 0 -#else -#define VEC_GC_ENABLED 1 -#endif // GENERATOR_FILE - -#include "statistics.h" // For CXX_MEM_STAT_INFO. - -#if VEC_GC_ENABLED -#include "ggc.h" -#else -# ifndef GCC_GGC_H - /* Even if we think that GC is not enabled, the test that sets it is - weak. There are files compiled with -DGENERATOR_FILE that already - include ggc.h. We only need to provide these definitions if ggc.h - has not been included. Sigh. */ - - extern void ggc_free (void *); - extern size_t ggc_round_alloc_size (size_t requested_size); - extern void *ggc_realloc (void *, size_t MEM_STAT_DECL); -# endif // GCC_GGC_H -#endif // VEC_GC_ENABLED +/* Some gen* file have no ggc support as the header file gtype-desc.h is + missing. Provide these definitions in case ggc.h has not been included. + This is not a problem because any code that runs before gengtype is built + will never need to use GC vectors.*/ + +extern void ggc_free (void *); +extern size_t ggc_round_alloc_size (size_t requested_size); +extern void *ggc_realloc (void *, size_t MEM_STAT_DECL); /* Templated vector type and associated interfaces. |