mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-24 08:33:39 +00:00
Add CallSite::hasArgument to allow for seeing if a call passes a certain value as an argument quickly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51946 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
338169ddc9
commit
9515a8f88a
@ -130,6 +130,10 @@ public:
|
|||||||
I->setOperand(ArgNo+3, newVal); // Skip Function, BB, BB
|
I->setOperand(ArgNo+3, newVal); // Skip Function, BB, BB
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// hasArgument - Returns true if this CallSite passes the given Value* as an
|
||||||
|
/// argument to the called function.
|
||||||
|
bool hasArgument(Value *Arg);
|
||||||
|
|
||||||
/// arg_iterator - The type of iterator to use when looping over actual
|
/// arg_iterator - The type of iterator to use when looping over actual
|
||||||
/// arguments at this call site...
|
/// arguments at this call site...
|
||||||
typedef User::op_iterator arg_iterator;
|
typedef User::op_iterator arg_iterator;
|
||||||
|
@ -91,6 +91,13 @@ void CallSite::setDoesNotThrow(bool doesNotThrow) {
|
|||||||
cast<InvokeInst>(I)->setDoesNotThrow(doesNotThrow);
|
cast<InvokeInst>(I)->setDoesNotThrow(doesNotThrow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CallSite::hasArgument(Value *Arg) {
|
||||||
|
for (arg_iterator AI = this->arg_begin(), E = this->arg_end(); AI != E; ++AI)
|
||||||
|
if (AI->get() == Arg)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// TerminatorInst Class
|
// TerminatorInst Class
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user