CodeGen: Canonicalize access to function attributes, NFC
[oota-llvm.git] / lib / CodeGen / CodeGenPrepare.cpp
index c7a8d4cad53798897555e6f14cbc02debf5b6743..7e60c3b467929bc8f52ddd26df1516df337a6ff5 100644 (file)
@@ -217,8 +217,7 @@ bool CodeGenPrepare::runOnFunction(Function &F) {
   DominatorTreeWrapperPass *DTWP =
       getAnalysisIfAvailable<DominatorTreeWrapperPass>();
   DT = DTWP ? &DTWP->getDomTree() : nullptr;
-  OptSize = F.getAttributes().hasAttribute(AttributeSet::FunctionIndex,
-                                           Attribute::OptimizeForSize);
+  OptSize = F.hasFnAttribute(Attribute::OptimizeForSize);
 
   /// This optimization identifies DIV instructions that can be
   /// profitably bypassed and carried out with a shorter, faster divide.