diff --git a/llvm/include/llvm/CodeGen/MachineFrameInfo.h b/llvm/include/llvm/CodeGen/MachineFrameInfo.h --- a/llvm/include/llvm/CodeGen/MachineFrameInfo.h +++ b/llvm/include/llvm/CodeGen/MachineFrameInfo.h @@ -785,7 +785,9 @@ /// created, whether or not the index returned is actually used. int CreateVariableSizedObject(Align Alignment, const AllocaInst *Alloca); /// FIXME: Remove this function when transition to Align is over. - int CreateVariableSizedObject(unsigned Alignment, const AllocaInst *Alloca) { + LLVM_ATTRIBUTE_DEPRECATED(int CreateVariableSizedObject( + unsigned Alignment, const AllocaInst *Alloca), + "Use the version that takes an Align instead") { return CreateVariableSizedObject(assumeAligned(Alignment), Alloca); } diff --git a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp --- a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp @@ -190,7 +190,7 @@ // stack allocation for each one. // Inform the Frame Information that we have variable-sized objects. MF->getFrameInfo().CreateVariableSizedObject( - Alignment <= StackAlign ? 0 : Alignment.value(), AI); + Alignment <= StackAlign ? Align(1) : Alignment, AI); } }