diff options
Diffstat (limited to 'lib/Transforms/Utils/InlineCost.cpp')
-rw-r--r-- | lib/Transforms/Utils/InlineCost.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/Transforms/Utils/InlineCost.cpp b/lib/Transforms/Utils/InlineCost.cpp index b9f13d923b..209ba92718 100644 --- a/lib/Transforms/Utils/InlineCost.cpp +++ b/lib/Transforms/Utils/InlineCost.cpp @@ -182,12 +182,9 @@ InlineCost InlineCostAnalyzer::getInlineCost(CallSite CS, // Don't inline functions which can be redefined at link-time to mean // something else. - // 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. - if ((Callee->mayBeOverridden() && !Callee->hasLinkOnceLinkage()) || - // Don't inline functions marked noinline. - Callee->hasFnAttr(Attribute::NoInline) || NeverInline.count(Callee)) + if (Callee->mayBeOverridden() || + // Don't inline functions marked noinline. + Callee->hasFnAttr(Attribute::NoInline) || NeverInline.count(Callee)) return llvm::InlineCost::getNever(); // InlineCost - This value measures how good of an inline candidate this call |