[llvm-commits] [127801] When an LLVM type has struct padding that overlaps with important fields of
Chris Lattner
clattner at apple.com
Thu May 31 09:42:09 PDT 2007
On May 31, 2007, at 6:18 AM, Duncan Sands wrote:
> Hi Chris, this breaks the Ada build since the TYPE_SIZE may not be
> a constant:
>
>> + if (TYPE_SIZE(type) == 0 ||
>> + PadStartBits >= int(TREE_INT_CST_LOW(TYPE_SIZE(type))) ||
>
> I've attached a fix, which includes some other tweaks for arrays
> (not very important) plus whitespace cleanup.
Does this actually cause a problem? This function is only called if
the outer struct has constant size. TreeToLLVM::EmitAggregateCopy
checks that TREE_CODE(TYPE_SIZE(type)) == INTEGER_CST is true before
calling into this code.
-Chris
More information about the llvm-commits
mailing list