Set MinABIStackAlignInBytes to 8 if ABI is N32/64.
llvm-svn: 143597
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp
index 83cddb2..2bd341c 100644
--- a/clang/lib/CodeGen/TargetInfo.cpp
+++ b/clang/lib/CodeGen/TargetInfo.cpp
@@ -2992,11 +2992,12 @@
namespace {
class MipsABIInfo : public ABIInfo {
- static const unsigned MinABIStackAlignInBytes = 4;
bool IsO32;
+ unsigned MinABIStackAlignInBytes;
llvm::Type* HandleStructTy(QualType Ty) const;
public:
- MipsABIInfo(CodeGenTypes &CGT, bool _IsO32) : ABIInfo(CGT), IsO32(_IsO32) {}
+ MipsABIInfo(CodeGenTypes &CGT, bool _IsO32) :
+ ABIInfo(CGT), IsO32(_IsO32), MinABIStackAlignInBytes(IsO32 ? 4 : 8) {}
ABIArgInfo classifyReturnType(QualType RetTy) const;
ABIArgInfo classifyArgumentType(QualType RetTy) const;
@@ -3005,8 +3006,6 @@
CodeGenFunction &CGF) const;
};
-const unsigned MipsABIInfo::MinABIStackAlignInBytes;
-
class MIPSTargetCodeGenInfo : public TargetCodeGenInfo {
unsigned SizeOfUnwindException;
public: