summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/InlineAlways.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/IPO/InlineAlways.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/InlineAlways.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/InlineAlways.cpp b/llvm/lib/Transforms/IPO/InlineAlways.cpp
index 2ae402e497e..52d81764df8 100644
--- a/llvm/lib/Transforms/IPO/InlineAlways.cpp
+++ b/llvm/lib/Transforms/IPO/InlineAlways.cpp
@@ -87,7 +87,8 @@ InlineCost AlwaysInliner::getInlineCost(CallSite CS) {
// that are viable for inlining. FIXME: We shouldn't even get here for
// declarations.
if (Callee && !Callee->isDeclaration() &&
- Callee->getFnAttributes().hasAttribute(Attribute::AlwaysInline) &&
+ Callee->getAttributes().hasAttribute(AttributeSet::FunctionIndex,
+ Attribute::AlwaysInline) &&
CA.isInlineViable(*Callee))
return InlineCost::getAlways();
OpenPOWER on IntegriCloud