From 2fc075948c72b028bb8e9cafb2ca2e8d408ce629 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Wed, 18 Aug 2021 10:43:17 -0700 Subject: [NFC] Remove some unnecessary AttributeList methods These rely on methods I'm trying to cleanup. --- llvm/lib/CodeGen/MachineFunction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/MachineFunction.cpp') diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 0a454b68aca3..88dc5a6544a7 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -129,8 +129,8 @@ void ilist_alloc_traits::deleteNode(MachineBasicBlock *MBB) { static inline unsigned getFnStackAlignment(const TargetSubtargetInfo *STI, const Function &F) { - if (F.hasFnAttribute(Attribute::StackAlignment)) - return F.getFnStackAlignment(); + if (auto MA = F.getFnStackAlign()) + return MA->value(); return STI->getFrameLowering()->getStackAlign().value(); } -- cgit v1.2.3