diff options
Diffstat (limited to 'lib/Transforms/Utils')
-rw-r--r-- | lib/Transforms/Utils/InlineCost.cpp | 9 | ||||
-rw-r--r-- | lib/Transforms/Utils/LowerInvoke.cpp | 2 |
2 files changed, 4 insertions, 7 deletions
diff --git a/lib/Transforms/Utils/InlineCost.cpp b/lib/Transforms/Utils/InlineCost.cpp index b9f13d9..209ba92 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 diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp index 20cff90..b0364ec 100644 --- a/lib/Transforms/Utils/LowerInvoke.cpp +++ b/lib/Transforms/Utils/LowerInvoke.cpp @@ -139,7 +139,7 @@ bool LowerInvoke::doInitialization(Module &M) { // already exists. if (!(JBListHead = M.getGlobalVariable("llvm.sjljeh.jblist", PtrJBList))) { JBListHead = new GlobalVariable(PtrJBList, false, - GlobalValue::LinkOnceLinkage, + GlobalValue::LinkOnceAnyLinkage, Constant::getNullValue(PtrJBList), "llvm.sjljeh.jblist", &M); } |