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

Daniel Dunbar daniel at zuster.org
Mon May 4 13:52:38 PDT 2009


Author: ddunbar
Date: Mon May  4 15:52:37 2009
New Revision: 70905

URL: http://llvm.org/viewvc/llvm-project?rev=70905&view=rev
Log:
Initialize NextOffset correctly, otherwise tight layout fails for
empty classes.

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=70905&r1=70904&r2=70905&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/RecordLayout.h (original)
+++ cfe/trunk/include/clang/AST/RecordLayout.h Mon May  4 15:52:37 2009
@@ -36,7 +36,7 @@
   friend class ASTContext;
 
   ASTRecordLayout(uint64_t S = 0, unsigned A = 8) 
-    : Size(S), Alignment(A), FieldCount(0), NextOffset(0) {}
+    : Size(S), Alignment(A), FieldCount(0), NextOffset(S) {}
   ~ASTRecordLayout() {
     delete [] FieldOffsets;
   }





More information about the cfe-commits mailing list