diff options
Diffstat (limited to 'lib/Analysis/IPA/CallGraph.cpp')
-rw-r--r-- | lib/Analysis/IPA/CallGraph.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp index c8f1d92065..ea7d7feb4c 100644 --- a/lib/Analysis/IPA/CallGraph.cpp +++ b/lib/Analysis/IPA/CallGraph.cpp @@ -126,7 +126,8 @@ private: // Loop over all of the users of the function, looking for non-call uses. for (Value::use_iterator I = F->use_begin(), E = F->use_end(); I != E; ++I) - if ((!isa<CallInst>(*I) && !isa<InvokeInst>(*I)) || I.getOperandNo()) { + if ((!isa<CallInst>(I) && !isa<InvokeInst>(I)) + || !CallSite(cast<Instruction>(I)).isCallee(I)) { // Not a call, or being used as a parameter rather than as the callee. ExternalCallingNode->addCalledFunction(CallSite(), Node); break; |