CodeGen: Canonicalize access to function attributes, NFC
[oota-llvm.git] / lib / CodeGen / BranchFolding.cpp
index 2128da1b8aac0673c84eac151f59765ccaa90bc8..b8f05cdf0bb2f5054f9c778039a5be0d618df942 100644 (file)
@@ -601,8 +601,7 @@ static bool ProfitableToMerge(MachineBasicBlock *MBB1,
   // instructions that would be deleted in the merge.
   MachineFunction *MF = MBB1->getParent();
   if (EffectiveTailLen >= 2 &&
-      MF->getFunction()->getAttributes().
-        hasAttribute(AttributeSet::FunctionIndex, Attribute::OptimizeForSize) &&
+      MF->getFunction()->hasFnAttribute(Attribute::OptimizeForSize) &&
       (I1 == MBB1->begin() || I2 == MBB2->begin()))
     return true;