[llvm-commits] [llvm-gcc-4.2] r46450 - in /llvm-gcc-4.2/trunk/gcc: llvm-abi.h llvm-internal.h llvm-types.cpp
Evan Cheng
evan.cheng at apple.com
Mon Jan 28 11:08:47 PST 2008
On Jan 28, 2008, at 2:14 AM, Duncan Sands wrote:
> Hi Evan, thanks for doing this.
>
>> +static bool isZeroSizedStructOrUnion(tree type) {
>> + if (TREE_CODE(type) != RECORD_TYPE && TREE_CODE(type) !=
>> UNION_TYPE)
>
> You should let QUAL_UNION through here as well. And what about size-
> zero
> arrays? Or for that matter, zero size anything?
What exactly is QUAL_UNION? I am pretty sure other cases (especially
zero sized arrays) are handled differently.
>
>
>> + // Skip 'int:0', which just affects layout.
>> + unsigned FieldSizeInBits =
>> TREE_INT_CST_LOW(DECL_SIZE(Field));
>> + if (FieldSizeInBits == 0)
>> + continue;
>
> This is probably safe (not completely clear), but why do you need to
> do it at all?
Because they are skipped earlier when we did the type translation.
Evan
>
>
> Ciao,
>
> Duncan.
More information about the llvm-commits
mailing list