summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodePlacementOpt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CodePlacementOpt.cpp')
-rw-r--r--lib/CodeGen/CodePlacementOpt.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CodePlacementOpt.cpp b/lib/CodeGen/CodePlacementOpt.cpp
index 75dbf72dd0..24518443a7 100644
--- a/lib/CodeGen/CodePlacementOpt.cpp
+++ b/lib/CodeGen/CodePlacementOpt.cpp
@@ -373,7 +373,8 @@ bool CodePlacementOpt::OptimizeIntraLoopEdges(MachineFunction &MF) {
///
bool CodePlacementOpt::AlignLoops(MachineFunction &MF) {
const Function *F = MF.getFunction();
- if (F->getFnAttributes().hasAttribute(Attribute::OptimizeForSize))
+ if (F->getAttributes().hasAttribute(AttributeSet::FunctionIndex,
+ Attribute::OptimizeForSize))
return false;
unsigned Align = TLI->getPrefLoopAlignment();