CodeGen: Canonicalize access to function attributes, NFC
[oota-llvm.git] / lib / CodeGen / MachineCombiner.cpp
index 128180d51beb0f19dfcea68cf157aa0fb429a18c..41045ac0bab86fada0931e96fca1602f707ed907 100644 (file)
@@ -413,8 +413,7 @@ bool MachineCombiner::runOnMachineFunction(MachineFunction &MF) {
   Traces = &getAnalysis<MachineTraceMetrics>();
   MinInstr = 0;
 
-  OptSize = MF.getFunction()->getAttributes().hasAttribute(
-      AttributeSet::FunctionIndex, Attribute::OptimizeForSize);
+  OptSize = MF.getFunction()->hasFnAttribute(Attribute::OptimizeForSize);
 
   DEBUG(dbgs() << getPassName() << ": " << MF.getName() << '\n');
   if (!TII->useMachineCombiner()) {