diff --git a/llvm/include/llvm/CodeGen/CallingConvLower.h b/llvm/include/llvm/CodeGen/CallingConvLower.h --- a/llvm/include/llvm/CodeGen/CallingConvLower.h +++ b/llvm/include/llvm/CodeGen/CallingConvLower.h @@ -434,7 +434,9 @@ } // 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 @@ } /// 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 --- a/llvm/lib/CodeGen/CallingConvLower.cpp +++ b/llvm/lib/CodeGen/CallingConvLower.cpp @@ -54,7 +54,7 @@ MF.getSubtarget().getTargetLowering()->HandleByVal(this, Size, Alignment.value()); Size = unsigned(alignTo(Size, MinAlign)); - unsigned Offset = AllocateStack(Size, Alignment.value()); + unsigned Offset = AllocateStack(Size, Alignment); addLoc(CCValAssign::getMem(ValNo, ValVT, Offset, LocVT, LocInfo)); }