1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

use simpler methods.

llvm-svn: 20706
This commit is contained in:
Chris Lattner 2005-03-20 02:41:16 +00:00
parent dddb514aa9
commit 2a3687ecb0

View File

@ -56,11 +56,10 @@ bool CompleteBUDataStructures::runOnModule(Module &M) {
Instruction *TheCall = CSI->getCallSite().getInstruction();
if (CSI->isIndirectCall()) { // indirect call: insert all callees
const std::vector<GlobalValue*> &Callees =
CSI->getCalleeNode()->getGlobals();
std::vector<Function*> Callees;
CSI->getCalleeNode()->addFullFunctionList(Callees);
for (unsigned i = 0, e = Callees.size(); i != e; ++i)
if (Function *F = dyn_cast<Function>(Callees[i]))
ActualCallees.insert(std::make_pair(TheCall, F));
ActualCallees.insert(std::make_pair(TheCall, Callees[i]));
} else { // direct call: insert the single callee directly
ActualCallees.insert(std::make_pair(TheCall,
CSI->getCalleeFunc()));