mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-21 21:41:43 +00:00
Add useful method, minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17715 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4b2c09fa22
commit
e6c745261e
@ -13,8 +13,7 @@
|
||||
// NOTE: This class is supposed to have "value semantics". So it should be
|
||||
// passed by value, not by reference; it should not be "new"ed or "delete"d. It
|
||||
// is efficiently copyable, assignable and constructable, with cost equivalent
|
||||
// to copying a pointer. (You will notice that it has only a single data
|
||||
// member.)
|
||||
// to copying a pointer (notice that it has only a single data member).
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
@ -85,6 +84,11 @@ public:
|
||||
I->setOperand(0, V);
|
||||
}
|
||||
|
||||
Value *getArgument(unsigned ArgNo) const {
|
||||
assert(arg_begin() + ArgNo < arg_end() && "Argument # out of range!");
|
||||
return *(arg_begin()+ArgNo);
|
||||
}
|
||||
|
||||
/// arg_iterator - The type of iterator to use when looping over actual
|
||||
/// arguments at this call site...
|
||||
typedef User::op_iterator arg_iterator;
|
||||
|
Loading…
x
Reference in New Issue
Block a user