From 04d9cb67703ad036ebe3015f57f5a31d7ce658dc Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 20 Sep 2003 16:34:13 +0000 Subject: Switch from using CallInst's to represent call sites to using the LLVM CallSite class. Now we can represent function calls by invoke instructions too! llvm-svn: 8629 --- llvm/lib/Analysis/DataStructure/DataStructureStats.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Analysis/DataStructure/DataStructureStats.cpp') diff --git a/llvm/lib/Analysis/DataStructure/DataStructureStats.cpp b/llvm/lib/Analysis/DataStructure/DataStructureStats.cpp index 674f689a685..ffd560b2457 100644 --- a/llvm/lib/Analysis/DataStructure/DataStructureStats.cpp +++ b/llvm/lib/Analysis/DataStructure/DataStructureStats.cpp @@ -68,7 +68,7 @@ void DSGraphStats::countCallees(const Function& F) { const std::vector &callSites = TDGraph->getFunctionCalls(); for (unsigned i = 0, N = callSites.size(); i != N; ++i) - if (isIndirectCallee(callSites[i].getCallInst().getCalledValue())) { + if (isIndirectCallee(callSites[i].getCallSite().getCalledValue())) { // This is an indirect function call const std::vector &Callees = callSites[i].getCalleeNode()->getGlobals(); @@ -76,8 +76,9 @@ void DSGraphStats::countCallees(const Function& F) { totalNumCallees += Callees.size(); ++numIndirectCalls; } else - std::cerr << "WARNING: No callee in Function " << F.getName() - << "at call:\n" << callSites[i].getCallInst(); + std::cerr << "WARNING: No callee in Function '" << F.getName() + << "' at call: \n" + << *callSites[i].getCallSite().getInstruction(); } TotalNumCallees += totalNumCallees; -- cgit v1.2.3