CodeGen: Canonicalize access to function attributes, NFC
[oota-llvm.git] / lib / CodeGen / MachineBlockPlacement.cpp
index 779b84e99b8ddff0cf6029f07c22d6f14e5af4db..ea41b5e63b8b6990cda4b6ca2af86c7340156081 100644 (file)
@@ -1058,8 +1058,7 @@ void MachineBlockPlacement::buildCFGChains(MachineFunction &F) {
   // exclusively on the loop info here so that we can align backedges in
   // unnatural CFGs and backedges that were introduced purely because of the
   // loop rotations done during this layout pass.
-  if (F.getFunction()->getAttributes().
-        hasAttribute(AttributeSet::FunctionIndex, Attribute::OptimizeForSize))
+  if (F.getFunction()->hasFnAttribute(Attribute::OptimizeForSize))
     return;
   if (FunctionChain.begin() == FunctionChain.end())
     return;  // Empty chain.