diff --git a/llvm/lib/Analysis/DataStructure/DataStructureStats.cpp b/llvm/lib/Analysis/DataStructure/DataStructureStats.cpp index 3f8b6a93b8df..afb69b8387d6 100644 --- a/llvm/lib/Analysis/DataStructure/DataStructureStats.cpp +++ b/llvm/lib/Analysis/DataStructure/DataStructureStats.cpp @@ -79,8 +79,9 @@ void DSGraphStats::countCallees(const Function& F) { I != E; ++I) if (isIndirectCallee(I->getCallSite().getCalledValue())) { // This is an indirect function call - const std::vector &Callees = - I->getCalleeNode()->getGlobals(); + std::vector Callees; + I->getCalleeNode()->addFullFunctionList(Callees); + if (Callees.size() > 0) { totalNumCallees += Callees.size(); ++numIndirectCalls;