[cfe-commits] r70914 - /cfe/trunk/include/clang/AST/RecordLayout.h

Daniel Dunbar daniel at zuster.org
Mon May 4 14:10:32 PDT 2009


Author: ddunbar
Date: Mon May  4 16:10:32 2009
New Revision: 70914

URL: http://llvm.org/viewvc/llvm-project?rev=70914&view=rev
Log:
Add ASTRecordLayout::getFieldCount accessor, change NextOffset field to 64-bits.

Modified:
    cfe/trunk/include/clang/AST/RecordLayout.h

Modified: cfe/trunk/include/clang/AST/RecordLayout.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/RecordLayout.h?rev=70914&r1=70913&r2=70914&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/RecordLayout.h (original)
+++ cfe/trunk/include/clang/AST/RecordLayout.h Mon May  4 16:10:32 2009
@@ -29,14 +29,14 @@
 /// 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 @@
   /// 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 {





More information about the cfe-commits mailing list