@@ -268,16 +268,15 @@ llvm::Value *DefaultABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
268
268
ABIArgInfo DefaultABIInfo::classifyArgumentType (QualType Ty,
269
269
ASTContext &Context,
270
270
llvm::LLVMContext &VMContext) const {
271
- if (CodeGenFunction::hasAggregateLLVMType (Ty)) {
271
+ if (CodeGenFunction::hasAggregateLLVMType (Ty))
272
272
return ABIArgInfo::getIndirect (0 );
273
- } else {
274
- // Treat an enum type as its underlying type.
275
- if (const EnumType *EnumTy = Ty->getAs <EnumType>())
276
- Ty = EnumTy->getDecl ()->getIntegerType ();
273
+
274
+ // Treat an enum type as its underlying type.
275
+ if (const EnumType *EnumTy = Ty->getAs <EnumType>())
276
+ Ty = EnumTy->getDecl ()->getIntegerType ();
277
277
278
- return (Ty->isPromotableIntegerType () ?
279
- ABIArgInfo::getExtend () : ABIArgInfo::getDirect ());
280
- }
278
+ return (Ty->isPromotableIntegerType () ?
279
+ ABIArgInfo::getExtend () : ABIArgInfo::getDirect ());
281
280
}
282
281
283
282
// / X86_32ABIInfo - The X86-32 ABI information.
@@ -1367,6 +1366,8 @@ llvm::Value *X86_64ABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
1367
1366
// i8* reg_save_area;
1368
1367
// };
1369
1368
unsigned neededInt, neededSSE;
1369
+
1370
+ Ty = CGF.getContext ().getCanonicalType (Ty);
1370
1371
ABIArgInfo AI = classifyArgumentType (Ty, CGF.getContext (), VMContext,
1371
1372
neededInt, neededSSE);
1372
1373
0 commit comments