mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-25 21:46:50 +00:00
use simpler methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20706 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
977b705d74
commit
2496d696f0
@ -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
Block a user