diff options
-rw-r--r-- | include/clang/AST/RecordLayout.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/clang/AST/RecordLayout.h b/include/clang/AST/RecordLayout.h index e764cf8a61..826949e608 100644 --- a/include/clang/AST/RecordLayout.h +++ b/include/clang/AST/RecordLayout.h @@ -72,14 +72,24 @@ class ASTRecordLayout { void operator=(const ASTRecordLayout&); // DO NOT IMPLEMENT public: + /// getAlignment - Get the record alignment in bits. unsigned getAlignment() const { return Alignment; } + + /// getSize - Get the record size in bits. uint64_t getSize() const { return Size; } + /// getFieldOffset - Get the offset of the given field index, in + /// bits. uint64_t getFieldOffset(unsigned FieldNo) const { assert (FieldNo < FieldCount && "Invalid Field No"); return FieldOffsets[FieldNo]; } + /// getNextOffset - Get the next available (unused) offset in the + /// structure, in bits. + uint64_t getNextOffset() const { + return NextOffset; + } }; } // end namespace clang |