[llvm-commits] [llvm-gcc-4.2] r45907 - in /llvm-gcc-4.2/trunk/gcc: llvm-abi.h llvm-convert.cpp llvm-types.cpp
Chris Lattner
clattner at apple.com
Sun Jan 13 11:59:40 PST 2008
On Jan 13, 2008, at 1:54 AM, Duncan Sands wrote:
> Hi Evan, this breaks the Ada build:
>
> Wrong type for attribute byval
> void ([4 x i8]*, i8, i8, i8, i8, [4 x i8]*)*
> @system__file_io__fopen_mode
>
> Is byval supposed to be able to handle passing arrays by value or only
> structs? The verifier, via ParamAttr::typeIncompatible, checks that
> byval is only applied to pointers to structs:
>
> if (const PointerType *PTy = dyn_cast<PointerType>(Ty)) {
> if (!isa<StructType>(PTy->getElementType()))
> // Attributes that only apply to pointers to structs.
> Incompatible |= ParamAttr::ByVal;
> } else {
byval makes sense semantically for any pointer to sized type, I think
it would be reasonable to expand it to allow any of these pointers,
including the one above.
-Chris
More information about the llvm-commits
mailing list