Initial (but disabled) fix for ticket #294 , the actual part that fixes the bug is in a #if 0 block as I'm afraid it will cause regressions. I'm most likely not going to be around tonight, and maybe not tomorrow as well, so I'm pushing it in case someone wants to run some serious testing/investigate the problem noted in llvmhelpers.cpp : realignOffset .

This commit is contained in:
Tomas Lindquist Olsen
2009-05-14 17:20:17 +02:00
parent f5d635dfc7
commit b147ecc66d
7 changed files with 49 additions and 12 deletions

View File

@@ -169,8 +169,7 @@ LLConstant * IrStruct::createStructDefaultInitializer()
size_t alignedoffset = offset;
if (!packed)
{
size_t alignsize = vd->type->alignsize();
alignedoffset = (offset + alignsize - 1) & ~(alignsize - 1);
alignedoffset = realignOffset(alignedoffset, vd->type);
}
// insert explicit padding?
@@ -355,8 +354,7 @@ LLConstant * IrStruct::createStructInitializer(StructInitializer * si)
size_t alignedoffset = offset;
if (!packed)
{
size_t alignsize = vd->type->alignsize();
alignedoffset = (offset + alignsize - 1) & ~(alignsize - 1);
alignedoffset = realignOffset(alignedoffset, vd->type);
}
// insert explicit padding?