Use getABITypeSizeInBits() instead of getTypeSizeInBits() during struct layout.

llvm-svn: 44798
This commit is contained in:
Devang Patel 2007-12-10 18:25:34 +00:00
parent 256a15d532
commit bb5c0d8960
2 changed files with 14 additions and 1 deletions

View File

@ -459,7 +459,7 @@ void RecordOrganizer::layoutStructFields(const ASTRecordLayout &RL) {
} else {
ExtraBits = 0;
const llvm::Type *Ty = CGT.ConvertType(FD->getType());
addLLVMField(Ty, CGT.getTargetData().getTypeSizeInBits(Ty), FD, 0, 0);
addLLVMField(Ty, CGT.getTargetData().getABITypeSizeInBits(Ty), FD, 0, 0);
}
}
STy = llvm::StructType::get(LLVMFields);

View File

@ -90,3 +90,16 @@ void f8()
}
/* _Bool types */
struct _w
{
short a,b;
short c,d;
short e,f;
short g;
unsigned int h,i;
_Bool j,k;
} ws;