summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/IPO/FunctionAttrs.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
index 28982d66d7d..9e95e796da6 100644
--- a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
@@ -1300,7 +1300,7 @@ static bool addNoRecurseAttrs(const SCCNodeSet &SCCNodes) {
return false;
Function *F = *SCCNodes.begin();
- if (!F || F->isDeclaration() || F->doesNotRecurse())
+ if (!F || !F->hasExactDefinition() || F->doesNotRecurse())
return false;
// If all of the calls in F are identifiable and are to norecurse functions, F
OpenPOWER on IntegriCloud