aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/InlineCost.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-11-05 01:37:05 +0000
committerDevang Patel <dpatel@apple.com>2008-11-05 01:37:05 +0000
commitd91ac615e3957247cd9f4ebdff40016603f11793 (patch)
tree79c3a60757010ed2f9d8829f9626a5a9362d84c7 /lib/Transforms/Utils/InlineCost.cpp
parent1508606ee80b9289d3c7c8121e67d9e744e2b4f2 (diff)
Check Attribute::NoInline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58742 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/InlineCost.cpp')
-rw-r--r--lib/Transforms/Utils/InlineCost.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Transforms/Utils/InlineCost.cpp b/lib/Transforms/Utils/InlineCost.cpp
index b85a45590c..29d4f79732 100644
--- a/lib/Transforms/Utils/InlineCost.cpp
+++ b/lib/Transforms/Utils/InlineCost.cpp
@@ -182,11 +182,9 @@ InlineCost InlineCostAnalyzer::getInlineCost(CallSite CS,
// FIXME: We allow link-once linkage since in practice all versions of
// the function have the same body (C++ ODR) - but the LLVM definition
// of LinkOnceLinkage doesn't require this.
- (Callee->mayBeOverridden() && !Callee->hasLinkOnceLinkage()
- ) ||
-
+ (Callee->mayBeOverridden() && !Callee->hasLinkOnceLinkage()) ||
// Don't inline functions marked noinline.
- NeverInline.count(Callee))
+ Callee->hasFnAttr(Attribute::NoInline) || NeverInline.count(Callee))
return llvm::InlineCost::getNever();
// InlineCost - This value measures how good of an inline candidate this call