aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-05-04 21:00:40 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-05-04 21:00:40 +0000
commitf773737e35b5a7c35ea75d5092249b7ba260cec3 (patch)
tree8f3e29291986145dca2a8f67d7033cab2464336c
parentbc6ea8125afbab8635f5c319229d1ba8aa2e25e2 (diff)
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
-rw-r--r--include/clang/AST/RecordLayout.h10
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