aboutsummaryrefslogtreecommitdiff
path: root/gcc/vec.h
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2007-03-26 20:49:17 +0000
committerZack Weinberg <zack@gcc.gnu.org>2007-03-26 20:49:17 +0000
commit4a399aef3a4ddd508c25f73320646d03dfc08660 (patch)
tree5c5425e795d5f2118efc197d6f1f21ff945b4933 /gcc/vec.h
parentd287ace688a2c48801eb479c7a60948a939c00aa (diff)
downloadgcc-4a399aef3a4ddd508c25f73320646d03dfc08660.zip
gcc-4a399aef3a4ddd508c25f73320646d03dfc08660.tar.gz
gcc-4a399aef3a4ddd508c25f73320646d03dfc08660.tar.bz2
vec.h: Remove all #if IN_GENGTYPE blocks.
* vec.h: Remove all #if IN_GENGTYPE blocks. Add comment saying that changes may require adjustments to gengtype. * gengtype.c: Don't include coretypes.h or tm.h. Add comment to inclusion of errors.h. (note_def_vec, note_def_vec_alloc): New functions. * gengtype.h: Declare new functions. * gengtype-lex.l: Don't include coretypes.h. (YY_INPUT, macro_input, push_macro_expansion, mangle_macro_name): Delete. (update_lineno): Remove unnecessary prototype. (DEF_VEC_* rules): Simplify using note_def_vec / note_def_vec_alloc. (VEC rule): Just return VEC_TOKEN. * gengtype-yacc.y (VEC_TOKEN): New token type. (type): Add a production for VEC(a,b). * Makefile.in: Update dependencies. From-SVN: r123229
Diffstat (limited to 'gcc/vec.h')
-rw-r--r--gcc/vec.h26
1 files changed, 4 insertions, 22 deletions
diff --git a/gcc/vec.h b/gcc/vec.h
index 3bc6566..c8eabc9 100644
--- a/gcc/vec.h
+++ b/gcc/vec.h
@@ -417,7 +417,6 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#define VEC_lower_bound(T,V,O,LT) \
(VEC_OP(T,base,lower_bound)(VEC_BASE(V),O,LT VEC_CHECK_INFO))
-#if !IN_GENGTYPE
/* Reallocate an array of elements with prefix. */
extern void *vec_gc_p_reserve (void *, int MEM_STAT_DECL);
extern void *vec_gc_p_reserve_exact (void *, int MEM_STAT_DECL);
@@ -451,14 +450,12 @@ extern void vec_assert_fail (const char *, const char * VEC_CHECK_DECL)
#define VEC_ASSERT(EXPR,OP,T,A) (void)(EXPR)
#endif
+/* Note: gengtype has hardwired knowledge of the expansions of the
+ VEC, DEF_VEC_*, and DEF_VEC_ALLOC_* macros. If you change the
+ expansions of these macros you may need to change gengtype too. */
+
#define VEC(T,A) VEC_##T##_##A
#define VEC_OP(T,A,OP) VEC_##T##_##A##_##OP
-#else /* IN_GENGTYPE */
-#define VEC(T,A) VEC_ T _ A
-#define VEC_STRINGIFY(X) VEC_STRINGIFY_(X)
-#define VEC_STRINGIFY_(X) #X
-#undef GTY
-#endif /* IN_GENGTYPE */
/* Base of vector type, not user visible. */
#define VEC_T(T,B) \
@@ -488,10 +485,6 @@ typedef struct VEC(T,A) GTY \
#define VEC_BASE(P) ((P) ? &(P)->base : 0)
/* Vector of integer-like object. */
-#if IN_GENGTYPE
-{"DEF_VEC_I", VEC_STRINGIFY (VEC_T(#0,#1)) ";", "none"},
-{"DEF_VEC_ALLOC_I", VEC_STRINGIFY (VEC_TA (#0,#1,#2,#3)) ";", NULL},
-#else
#define DEF_VEC_I(T) \
static inline void VEC_OP (T,must_be,integral_type) (void) \
{ \
@@ -506,13 +499,8 @@ struct vec_swallow_trailing_semi
VEC_TA_GTY(T,base,A,); \
DEF_VEC_ALLOC_FUNC_I(T,A) \
struct vec_swallow_trailing_semi
-#endif
/* Vector of pointer to object. */
-#if IN_GENGTYPE
-{"DEF_VEC_P", VEC_STRINGIFY (VEC_T_GTY(#0,#1)) ";", "none"},
-{"DEF_VEC_ALLOC_P", VEC_STRINGIFY (VEC_TA_GTY (#0,#1,#2,#3)) ";", NULL},
-#else
#define DEF_VEC_P(T) \
static inline void VEC_OP (T,must_be,pointer_type) (void) \
{ \
@@ -527,7 +515,6 @@ struct vec_swallow_trailing_semi
VEC_TA_GTY(T,base,A,); \
DEF_VEC_ALLOC_FUNC_P(T,A) \
struct vec_swallow_trailing_semi
-#endif
#define DEF_VEC_FUNC_P(T) \
static inline unsigned VEC_OP (T,base,length) (const VEC(T,base) *vec_) \
@@ -809,10 +796,6 @@ static inline T *VEC_OP (T,A,safe_insert) \
}
/* Vector of object. */
-#if IN_GENGTYPE
-{"DEF_VEC_O", VEC_STRINGIFY (VEC_T_GTY(#0,#1)) ";", "none"},
-{"DEF_VEC_ALLOC_O", VEC_STRINGIFY (VEC_TA_GTY(#0,#1,#2,#3)) ";", NULL},
-#else
#define DEF_VEC_O(T) \
VEC_T_GTY(T,base); \
VEC_TA_GTY(T,base,none,); \
@@ -822,7 +805,6 @@ struct vec_swallow_trailing_semi
VEC_TA_GTY(T,base,A,); \
DEF_VEC_ALLOC_FUNC_O(T,A) \
struct vec_swallow_trailing_semi
-#endif
#define DEF_VEC_FUNC_O(T) \
static inline unsigned VEC_OP (T,base,length) (const VEC(T,base) *vec_) \