From f773737e35b5a7c35ea75d5092249b7ba260cec3 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Mon, 4 May 2009 21:00:40 +0000 Subject: [PATCH] Add ASTRecordLayout::getNextOffset accessor, and some doxygen comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70909 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/RecordLayout.h | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- 2.40.0