[llvm-commits] [llvm-gcc-4.2] r45181 - /llvm-gcc-4.2/trunk/gcc/llvm-types.cpp
Duncan Sands
duncan.sands at math.u-psud.fr
Tue Dec 18 23:12:22 PST 2007
PS:
> TREE_CODE(type) == POINTER_TYPE ||
> TREE_CODE(type) == REFERENCE_TYPE) && "not a sequential type!");
> // This relies on gcc types with constant size mapping to LLVM types with the
> - // same size.
> - return !VOID_TYPE_P(TREE_TYPE(type)) && isInt64(TYPE_SIZE(TREE_TYPE(type)), true);
> + // same size. It is possible for the component type not to have a size:
> + // struct foo; extern foo bar[];
> + return !VOID_TYPE_P(TREE_TYPE(type)) &&
> + (!TYPE_SIZE(TREE_TYPE(type)) ||
> + isInt64(TYPE_SIZE(TREE_TYPE(type)), true));
> }
does the !TYPE_SIZE test also catch !VOID_TYPE_P case?
More information about the llvm-commits
mailing list