contrib/gcc-4.7/gcc/cp/class.c
/* Build the primary virtual function table for TYPE.  If BINFO is
   non-NULL, build the vtable starting with the initial approximation
   that it is the same as the one which is the head of the association
   list.  Returns a nonzero value if a new vtable is actually
   created.  */
Build the primary virtual function table for TYPE.  If BINFO is
non-NULL, build the vtable starting with the initial approximation
that it is the same as the one which is the head of the association
list.  Returns a nonzero value if a new vtable is actually
created.
Build the primary virtual function table for TYPE . If BINFO is non - NULL build the vtable starting with the initial approximation that it is the same as the one which is the head of the association list . Returns a nonzero value if a new vtable is actually created .
static int
build_primary_vtable (tree binfo, tree type)
{
  tree decl;
  tree virtuals;
  decl = get_vtable_decl (type, 0);
  if (binfo)
    {
      if (BINFO_NEW_VTABLE_MARKED (binfo))
	return 0;
      virtuals = copy_list (BINFO_VIRTUALS (binfo));
      TREE_TYPE (decl) = TREE_TYPE (get_vtbl_decl_for_binfo (binfo));
      DECL_SIZE (decl) = TYPE_SIZE (TREE_TYPE (decl));
      DECL_SIZE_UNIT (decl) = TYPE_SIZE_UNIT (TREE_TYPE (decl));
    }
  else
    {
      gcc_assert (TREE_TYPE (decl) == vtbl_type_node);
      virtuals = NULL_TREE;
    }
#ifdef GATHER_STATISTICS
  n_vtables += 1;
  n_vtable_elems += list_length (virtuals);
#endif
  BINFO_VTABLE (TYPE_BINFO (type)) = decl;
  BINFO_VIRTUALS (TYPE_BINFO (type)) = virtuals;
  SET_BINFO_NEW_VTABLE_MARKED (TYPE_BINFO (type));
  return 1;
}
static int build_primary_vtable ( tree binfo , tree type ) { tree decl ; tree virtuals ; decl = get_vtable_decl ( type , 0 ) ; if ( binfo ) { if ( BINFO_NEW_VTABLE_MARKED ( binfo ) ) return 0 ; virtuals = copy_list ( BINFO_VIRTUALS ( binfo ) ) ; TREE_TYPE ( decl ) = TREE_TYPE ( get_vtbl_decl_for_binfo ( binfo ) ) ; DECL_SIZE ( decl ) = TYPE_SIZE ( TREE_TYPE ( decl ) ) ; DECL_SIZE_UNIT ( decl ) = TYPE_SIZE_UNIT ( TREE_TYPE ( decl ) ) ; } else { gcc_assert ( TREE_TYPE ( decl ) == vtbl_type_node ) ; virtuals = NULL_TREE ; } #ifdef GATHER_STATISTICS n_vtables += 1 ; n_vtable_elems += list_length ( virtuals ) ; #endif BINFO_VTABLE ( TYPE_BINFO ( type ) ) = decl ; BINFO_VIRTUALS ( TYPE_BINFO ( type ) ) = virtuals ; SET_BINFO_NEW_VTABLE_MARKED ( TYPE_BINFO ( type ) ) ; return 1 ; }
Build the primary virtual function table for TYPE.
Build the primary virtual function table for TYPE .
/*complete=*/ /* We have already created a vtable for this base, so there's
	   no need to do it again.  */ /* Initialize the association list for this type, based
     on our first approximation.  */