[cfe-commits] r70954 - /cfe/branches/Apple/Dib/include/clang/AST/RecordLayout.h

Mike Stump mrs at apple.com
Mon May 4 18:41:41 PDT 2009


Author: mrs
Date: Mon May  4 20:41:40 2009
New Revision: 70954

URL: http://llvm.org/viewvc/llvm-project?rev=70954&view=rev
Log:
Merge in 70905:

Initialize NextOffset correctly, otherwise tight layout fails for
empty classes.

Modified:
    cfe/branches/Apple/Dib/include/clang/AST/RecordLayout.h

Modified: cfe/branches/Apple/Dib/include/clang/AST/RecordLayout.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/include/clang/AST/RecordLayout.h?rev=70954&r1=70953&r2=70954&view=diff

==============================================================================
--- cfe/branches/Apple/Dib/include/clang/AST/RecordLayout.h (original)
+++ cfe/branches/Apple/Dib/include/clang/AST/RecordLayout.h Mon May  4 20:41:40 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