forked from OSchip/llvm-project
parent
1ffdd57e0a
commit
e68e808bcd
|
@ -56,11 +56,10 @@ bool CompleteBUDataStructures::runOnModule(Module &M) {
|
||||||
Instruction *TheCall = CSI->getCallSite().getInstruction();
|
Instruction *TheCall = CSI->getCallSite().getInstruction();
|
||||||
|
|
||||||
if (CSI->isIndirectCall()) { // indirect call: insert all callees
|
if (CSI->isIndirectCall()) { // indirect call: insert all callees
|
||||||
const std::vector<GlobalValue*> &Callees =
|
std::vector<Function*> Callees;
|
||||||
CSI->getCalleeNode()->getGlobals();
|
CSI->getCalleeNode()->addFullFunctionList(Callees);
|
||||||
for (unsigned i = 0, e = Callees.size(); i != e; ++i)
|
for (unsigned i = 0, e = Callees.size(); i != e; ++i)
|
||||||
if (Function *F = dyn_cast<Function>(Callees[i]))
|
ActualCallees.insert(std::make_pair(TheCall, Callees[i]));
|
||||||
ActualCallees.insert(std::make_pair(TheCall, F));
|
|
||||||
} else { // direct call: insert the single callee directly
|
} else { // direct call: insert the single callee directly
|
||||||
ActualCallees.insert(std::make_pair(TheCall,
|
ActualCallees.insert(std::make_pair(TheCall,
|
||||||
CSI->getCalleeFunc()));
|
CSI->getCalleeFunc()));
|
||||||
|
|
Loading…
Reference in New Issue