summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-05-04 20:52:37 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-05-04 20:52:37 +0000
commit45bfd982f130b3863b150c6553c57d6eb9830e34 (patch)
tree475a2affbfc5e6bd9c659391146c2ea2bef92a49
parentbb525f7e02fcf5b22ae6f4e80b215a764a1f576b (diff)
downloadbcm5719-llvm-45bfd982f130b3863b150c6553c57d6eb9830e34.tar.gz
bcm5719-llvm-45bfd982f130b3863b150c6553c57d6eb9830e34.zip
Initialize NextOffset correctly, otherwise tight layout fails for
empty classes. llvm-svn: 70905
-rw-r--r--clang/include/clang/AST/RecordLayout.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/include/clang/AST/RecordLayout.h b/clang/include/clang/AST/RecordLayout.h
index 57adc8a555d..e764cf8a61a 100644
--- a/clang/include/clang/AST/RecordLayout.h
+++ b/clang/include/clang/AST/RecordLayout.h
@@ -36,7 +36,7 @@ class ASTRecordLayout {
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;
}
OpenPOWER on IntegriCloud