[llvm-commits] [llvm-gcc-4.2] r45907 - in /llvm-gcc-4.2/trunk/gcc: llvm-abi.h llvm-convert.cpp llvm-types.cpp

Duncan Sands duncan.sands at math.u-psud.fr
Sun Jan 13 12:37:19 PST 2008


Hi Chris,

> 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.

I adjusted the check to allow pointers to arrays, but got a crash in
SelectionDAGISel.cpp:

	if (F.paramHasAttr(j, ParamAttr::ByVal)) {
	  Flags |= ISD::ParamFlags::ByVal;
	  const PointerType *Ty = cast<PointerType>(I->getType());
	  const StructType *STy = cast<StructType>(Ty->getElementType()); <== HERE

Ciao,

Duncan.



More information about the llvm-commits mailing list