Commit 1b50716d by Mark Mitchell Committed by Mark Mitchell

cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.

	* cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
	* class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
	CLASSTYPE_ALIGN.

From-SVN: r34252
parent 86c82654
2000-05-29 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
* class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
CLASSTYPE_ALIGN.
2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com> 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
* decl2.c (lang_decode_option): Use skip_leading_substring instead * decl2.c (lang_decode_option): Use skip_leading_substring instead
......
...@@ -3723,7 +3723,7 @@ layout_empty_base (binfo, eoc, binfo_offsets) ...@@ -3723,7 +3723,7 @@ layout_empty_base (binfo, eoc, binfo_offsets)
/* This routine should only be used for empty classes. */ /* This routine should only be used for empty classes. */
my_friendly_assert (is_empty_class (basetype), 20000321); my_friendly_assert (is_empty_class (basetype), 20000321);
alignment = ssize_int (CLASSTYPE_ALIGN (basetype)); alignment = ssize_int (CLASSTYPE_ALIGN_UNIT (basetype));
/* This is an empty base class. We first try to put it at offset /* This is an empty base class. We first try to put it at offset
zero. */ zero. */
......
...@@ -1637,6 +1637,10 @@ struct lang_type ...@@ -1637,6 +1637,10 @@ struct lang_type
#define CLASSTYPE_SIZE_UNIT(NODE) (TYPE_LANG_SPECIFIC(NODE)->size_unit) #define CLASSTYPE_SIZE_UNIT(NODE) (TYPE_LANG_SPECIFIC(NODE)->size_unit)
#define CLASSTYPE_ALIGN(NODE) (TYPE_LANG_SPECIFIC(NODE)->align) #define CLASSTYPE_ALIGN(NODE) (TYPE_LANG_SPECIFIC(NODE)->align)
/* The alignment of NODE, without its virtual bases, in bytes. */
#define CLASSTYPE_ALIGN_UNIT(NODE) \
(CLASSTYPE_ALIGN (NODE) / BITS_PER_UNIT)
/* A cons list of virtual functions which cannot be inherited by /* A cons list of virtual functions which cannot be inherited by
derived classes. When deriving from this type, the derived derived classes. When deriving from this type, the derived
class must provide its own definition for each of these functions. */ class must provide its own definition for each of these functions. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment