]> granicus.if.org Git - clang/commitdiff
Add ASTRecordLayout::getNextOffset accessor, and some doxygen comments.
authorDaniel Dunbar <daniel@zuster.org>
Mon, 4 May 2009 21:00:40 +0000 (21:00 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Mon, 4 May 2009 21:00:40 +0000 (21:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70909 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/RecordLayout.h

index e764cf8a61a35acf1167888dc0dd4ae5b8e908c8..826949e6089ac80b883e0a2e077d7ff7f1e56dc1 100644 (file)
@@ -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