mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
Add CallSite::getArgumentNo() to be able to translate an operand number into a
argument number. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53225 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8c174a9b5a
commit
b3739424da
@ -133,6 +133,15 @@ public:
|
|||||||
I->setOperand(getArgumentOffset() + ArgNo, newVal);
|
I->setOperand(getArgumentOffset() + ArgNo, newVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Given an operand number, returns the argument that corresponds to it.
|
||||||
|
/// OperandNo must be a valid operand number that actually corresponds to an
|
||||||
|
/// argument.
|
||||||
|
unsigned getArgumentNo(unsigned OperandNo) const {
|
||||||
|
assert(OperandNo >= getArgumentOffset() && "Operand number passed was not "
|
||||||
|
"a valid argument");
|
||||||
|
return OperandNo - getArgumentOffset();
|
||||||
|
}
|
||||||
|
|
||||||
/// hasArgument - Returns true if this CallSite passes the given Value* as an
|
/// hasArgument - Returns true if this CallSite passes the given Value* as an
|
||||||
/// argument to the called function.
|
/// argument to the called function.
|
||||||
bool hasArgument(const Value *Arg) const;
|
bool hasArgument(const Value *Arg) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user