mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
do not repeatedly dereference use_iterator
llvm-svn: 107963
This commit is contained in:
parent
9e2aa5d5d7
commit
7bc80c7586
@ -126,13 +126,15 @@ private:
|
||||
}
|
||||
|
||||
// Loop over all of the users of the function, looking for non-call uses.
|
||||
for (Value::use_iterator I = F->use_begin(), E = F->use_end(); I != E; ++I)
|
||||
if ((!isa<CallInst>(I) && !isa<InvokeInst>(I))
|
||||
|| !CallSite(cast<Instruction>(I)).isCallee(I)) {
|
||||
for (Value::use_iterator I = F->use_begin(), E = F->use_end(); I != E; ++I){
|
||||
User *U = *I;
|
||||
if ((!isa<CallInst>(U) && !isa<InvokeInst>(U))
|
||||
|| !CallSite(cast<Instruction>(U)).isCallee(I)) {
|
||||
// Not a call, or being used as a parameter rather than as the callee.
|
||||
ExternalCallingNode->addCalledFunction(CallSite(), Node);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// If this function is not defined in this translation unit, it could call
|
||||
// anything.
|
||||
|
Loading…
Reference in New Issue
Block a user