@@ -7704,7 +7704,7 @@ void MSP430TargetCodeGenInfo::setTargetAttributes(
7704
7704
// ===----------------------------------------------------------------------===//
7705
7705
7706
7706
namespace {
7707
- class MipsABIInfo : public ABIInfo {
7707
+ class MipsABIInfo : public SwiftABIInfo {
7708
7708
bool IsO32;
7709
7709
unsigned MinABIStackAlignInBytes, StackAlignInBytes;
7710
7710
void CoerceToIntArgs (uint64_t TySize,
@@ -7713,16 +7713,25 @@ class MipsABIInfo : public ABIInfo {
7713
7713
llvm::Type* returnAggregateInRegs (QualType RetTy, uint64_t Size) const ;
7714
7714
llvm::Type* getPaddingType (uint64_t Align, uint64_t Offset) const ;
7715
7715
public:
7716
- MipsABIInfo (CodeGenTypes &CGT, bool _IsO32) :
7717
- ABIInfo (CGT), IsO32(_IsO32), MinABIStackAlignInBytes(IsO32 ? 4 : 8 ),
7718
- StackAlignInBytes (IsO32 ? 8 : 16 ) {}
7716
+ MipsABIInfo (CodeGenTypes &CGT, bool _IsO32)
7717
+ : SwiftABIInfo(CGT), IsO32(_IsO32),
7718
+ MinABIStackAlignInBytes (IsO32 ? 4 : 8 ),
7719
+ StackAlignInBytes(IsO32 ? 8 : 16 ) {}
7719
7720
7720
7721
ABIArgInfo classifyReturnType (QualType RetTy) const ;
7721
7722
ABIArgInfo classifyArgumentType (QualType RetTy, uint64_t &Offset) const ;
7722
7723
void computeInfo (CGFunctionInfo &FI) const override ;
7723
7724
Address EmitVAArg (CodeGenFunction &CGF, Address VAListAddr,
7724
7725
QualType Ty) const override ;
7725
7726
ABIArgInfo extendType (QualType Ty) const ;
7727
+
7728
+ private:
7729
+ bool shouldPassIndirectlyForSwift (ArrayRef<llvm::Type *> scalars,
7730
+ bool asReturnValue) const override {
7731
+ return occupiesMoreThan (CGT, scalars, /* total*/ 4 );
7732
+ }
7733
+
7734
+ bool isSwiftErrorInRegister () const override { return false ; }
7726
7735
};
7727
7736
7728
7737
class MIPSTargetCodeGenInfo : public TargetCodeGenInfo {
0 commit comments