mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 00:24:26 +00:00
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user