AArch64: Canonicalize access to function attributes, NFC
[oota-llvm.git] / lib / Target / AArch64 / AArch64FrameLowering.cpp
index e14460906260f468ba2415dd8a9c86497b103d27..84bf31795050eb08e59afdec49a1abbe316c3a7f 100644 (file)
@@ -64,8 +64,7 @@ bool AArch64FrameLowering::canUseRedZone(const MachineFunction &MF) const {
     return false;
   // Don't use the red zone if the function explicitly asks us not to.
   // This is typically used for kernel code.
-  if (MF.getFunction()->getAttributes().hasAttribute(
-          AttributeSet::FunctionIndex, Attribute::NoRedZone))
+  if (MF.getFunction()->hasFnAttribute(Attribute::NoRedZone))
     return false;
 
   const MachineFrameInfo *MFI = MF.getFrameInfo();