From 5e1677bcb0a88632d3f9ad495bf64748ec000a1e Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Sun, 2 Jan 2000 03:24:44 +0000 Subject: [PATCH] * tree.h (BINFO_N_BASETYPES): New macro. From-SVN: r31162 --- gcc/ChangeLog | 4 ++++ gcc/tree.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ccad086bf94..d7e736528a0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2000-01-01 Mark Mitchell + + * tree.h (BINFO_N_BASETYPES): New macro. + 2000-01-01 Bernd Schmidt * expmed.c (emit_store_flag): Prevent losing a pending stack diff --git a/gcc/tree.h b/gcc/tree.h index 893c8916a29..897f9286c63 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1018,6 +1018,10 @@ struct tree_type #define BINFO_BASETYPES(NODE) TREE_VEC_ELT ((NODE), 4) #define TYPE_BINFO_BASETYPES(NODE) TREE_VEC_ELT (TYPE_BINFO (NODE), 4) +/* The number of basetypes for NODE. */ +#define BINFO_N_BASETYPES(NODE) \ + (BINFO_BASETYPES (NODE) ? TREE_VEC_LENGTH (BINFO_BASETYPES (NODE)) : 0) + /* Accessor macro to get to the Nth basetype of this basetype. */ #define BINFO_BASETYPE(NODE,N) TREE_VEC_ELT (BINFO_BASETYPES (NODE), (N)) #define TYPE_BINFO_BASETYPE(NODE,N) BINFO_TYPE (TREE_VEC_ELT (BINFO_BASETYPES (TYPE_BINFO (NODE)), (N)))