CGRecordLayoutBuilder: Switch unions to use same mechanism for tracking field and bit-field info as structs.

- Anders, please check.

llvm-svn: 99977
This commit is contained in:
Daniel Dunbar 2010-03-31 00:55:13 +00:00
parent 9986ba954c
commit e75a64f2d3
1 changed files with 4 additions and 3 deletions

View File

@ -288,9 +288,10 @@ void CGRecordLayoutBuilder::LayoutUnion(const RecordDecl *D) {
continue;
// Add the bit field info.
Types.addBitFieldInfo(*Field, 0, 0, FieldSize);
} else
Types.addFieldInfo(*Field, 0);
LLVMBitFields.push_back(LLVMBitFieldInfo(*Field, 0, 0, FieldSize));
} else {
LLVMFields.push_back(LLVMFieldInfo(*Field, 0));
}
HasOnlyZeroSizedBitFields = false;