ABIArgInfo X86_32ABIInfo::classifyArgumentType(QualType Ty,
ASTContext &Context) const {
+ // FIXME: Set alignment on byval arguments.
if (CodeGenFunction::hasAggregateLLVMType(Ty)) {
// Structures with flexible arrays are always byval.
if (const RecordType *RT = Ty->getAsStructureType())
case ABIArgInfo::ByVal:
// byval arguments are always on the stack, which is addr space #0.
ArgTys.push_back(llvm::PointerType::getUnqual(Ty));
- assert(AI.getByValAlignment() == 0 && "FIXME: alignment unhandled");
break;
case ABIArgInfo::Direct:
case ABIArgInfo::ByVal:
Attributes |= llvm::Attribute::ByVal;
- assert(AI.getByValAlignment() == 0 && "FIXME: alignment unhandled");
+ Attributes |=
+ llvm::Attribute::constructAlignmentFromInt(AI.getByValAlignment());
break;
case ABIArgInfo::Direct: