[llvm-commits] [llvm-gcc-4.2] r46450 - in /llvm-gcc-4.2/trunk/gcc: llvm-abi.h llvm-internal.h llvm-types.cpp
Duncan Sands
baldrick at free.fr
Mon Jan 28 02:14:07 PST 2008
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?
> + // 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?
Ciao,
Duncan.
More information about the llvm-commits
mailing list