Author: baldrick Date: Mon Jan 21 05:28:49 2008 New Revision: 46207 URL: http://llvm.org/viewvc/llvm-project?rev=46207&view=rev Log: Check that sret is only used on pointers to types with a size, like byval.
Modified: llvm/trunk/lib/VMCore/ParameterAttributes.cpp Modified: llvm/trunk/lib/VMCore/ParameterAttributes.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ParameterAttributes.cpp?rev=46207&r1=46206&r2=46207&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/ParameterAttributes.cpp (original) +++ llvm/trunk/lib/VMCore/ParameterAttributes.cpp Mon Jan 21 05:28:49 2008 @@ -202,8 +202,8 @@ if (const PointerType *PTy = dyn_cast<PointerType>(Ty)) { if (!PTy->getElementType()->isSized()) - // The byval attribute only applies to pointers to types with a size. - Incompatible |= ParamAttr::ByVal; + // The byval and sret attributes only apply to pointers to sized types. + Incompatible |= ByVal | StructRet; } else { // Attributes that only apply to pointers. Incompatible |= ByVal | Nest | NoAlias | StructRet; _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits