diff --git a/llvm/include/llvm/CodeGen/CallingConvLower.h b/llvm/include/llvm/CodeGen/CallingConvLower.h index 41e4db7fcae39..ef2f25e750653 100644 --- a/llvm/include/llvm/CodeGen/CallingConvLower.h +++ b/llvm/include/llvm/CodeGen/CallingConvLower.h @@ -434,7 +434,9 @@ class CCState { } // FIXME: Deprecate this function when transition to Align is over. - unsigned AllocateStack(unsigned Size, unsigned Alignment) { + LLVM_ATTRIBUTE_DEPRECATED(unsigned AllocateStack(unsigned Size, + unsigned Alignment), + "Use the version that takes Align instead.") { return AllocateStack(Size, Align(Alignment)); } @@ -444,7 +446,10 @@ class CCState { } /// Version of AllocateStack with extra register to be shadowed. - unsigned AllocateStack(unsigned Size, unsigned Align, unsigned ShadowReg) { + LLVM_ATTRIBUTE_DEPRECATED(unsigned AllocateStack(unsigned Size, + unsigned Align, + unsigned ShadowReg), + "Use the version that takes Align instead.") { MarkAllocated(ShadowReg); return AllocateStack(Size, Align); } diff --git a/llvm/lib/CodeGen/CallingConvLower.cpp b/llvm/lib/CodeGen/CallingConvLower.cpp index 366cd985ecf3e..3d8c2c8b00aa7 100644 --- a/llvm/lib/CodeGen/CallingConvLower.cpp +++ b/llvm/lib/CodeGen/CallingConvLower.cpp @@ -52,7 +52,7 @@ void CCState::HandleByVal(unsigned ValNo, MVT ValVT, MVT LocVT, ensureMaxAlignment(Alignment); MF.getSubtarget().getTargetLowering()->HandleByVal(this, Size, Alignment); Size = unsigned(alignTo(Size, MinAlign)); - unsigned Offset = AllocateStack(Size, Alignment.value()); + unsigned Offset = AllocateStack(Size, Alignment); addLoc(CCValAssign::getMem(ValNo, ValVT, Offset, LocVT, LocInfo)); }