Add ASTRecordLayout::getFieldCount accessor, change NextOffset field to 64-bits.

llvm-svn: 70914
This commit is contained in:
Daniel Dunbar 2009-05-04 21:10:32 +00:00
parent 228895d56a
commit a8aa586a72
1 changed files with 5 additions and 2 deletions

View File

@ -29,14 +29,14 @@ namespace clang {
/// These objects are managed by ASTContext.
class ASTRecordLayout {
uint64_t Size; // Size of record in bits.
uint64_t NextOffset; // Next available offset
uint64_t *FieldOffsets;
unsigned Alignment; // Alignment of record in bits.
unsigned FieldCount; // Number of fields
unsigned NextOffset; // Next available offset
friend class ASTContext;
ASTRecordLayout(uint64_t S = 0, unsigned A = 8)
: Size(S), Alignment(A), FieldCount(0), NextOffset(S) {}
: Size(S), NextOffset(S), Alignment(A), FieldCount(0) {}
~ASTRecordLayout() {
delete [] FieldOffsets;
}
@ -78,6 +78,9 @@ public:
/// getSize - Get the record size in bits.
uint64_t getSize() const { return Size; }
/// getFieldCount - Get the number of fields in the layout.
unsigned getFieldCount() const { return FieldCount; }
/// getFieldOffset - Get the offset of the given field index, in
/// bits.
uint64_t getFieldOffset(unsigned FieldNo) const {