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 d24373c9b5..1a65179c5a 100644 --- a/lib/Analysis/IPA/CallGraph.cpp +++ b/lib/Analysis/IPA/CallGraph.cpp @@ -135,7 +135,8 @@ private: I != E && !isUsedExternally; ++I) { if (Instruction *Inst = dyn_cast<Instruction>(*I)) { CallSite CS = CallSite::get(Inst); - isUsedExternally = !CS.getInstruction() || CS.hasArgument(F); + // Not a call? Or F being passed as a parameter not as the callee? + isUsedExternally = !CS.getInstruction() || I.getOperandNo(); } else { // User is not a direct call! isUsedExternally = true; } |