diff options
author | Chris Lattner <sabre@nondot.org> | 2003-09-20 16:34:13 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-09-20 16:34:13 +0000 |
commit | 808a7aeec77e79ad236614a578b1bb758ce796ab (patch) | |
tree | 97f4e36e707c16b9b64ffc36c2acd3f1e6796f51 /lib/Analysis/DataStructure/DataStructureStats.cpp | |
parent | 192cd9cccd3eb2c030c3a25d636d90b69841868e (diff) |
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!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8629 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/DataStructureStats.cpp')
-rw-r--r-- | lib/Analysis/DataStructure/DataStructureStats.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Analysis/DataStructure/DataStructureStats.cpp b/lib/Analysis/DataStructure/DataStructureStats.cpp index 674f689a68..ffd560b245 100644 --- a/lib/Analysis/DataStructure/DataStructureStats.cpp +++ b/lib/Analysis/DataStructure/DataStructureStats.cpp @@ -68,7 +68,7 @@ void DSGraphStats::countCallees(const Function& F) { const std::vector<DSCallSite> &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<GlobalValue*> &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; |