mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
introduce a useful abstraction to find out if a Use is in the call position of an instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62788 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -126,7 +126,8 @@ 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)) || I.getOperandNo()) {
|
||||
if ((!isa<CallInst>(I) && !isa<InvokeInst>(I))
|
||||
|| !CallSite(cast<Instruction>(I)).isCallee(I)) {
|
||||
// Not a call, or being used as a parameter rather than as the callee.
|
||||
ExternalCallingNode->addCalledFunction(CallSite(), Node);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user