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
This commit is contained in:
Chris Lattner
2003-09-20 16:34:13 +00:00
parent 192cd9cccd
commit 808a7aeec7
12 changed files with 125 additions and 117 deletions

View File

@ -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;