diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-06-28 12:23:36 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-06-28 12:23:36 +0000 |
commit | 710ac0711fac5d6d64ca8eab5a100bf4578d21b9 (patch) | |
tree | e9b4cbbed5554400e1af41c71748fb2ca2099482 /include/llvm/Instructions.h | |
parent | 19101c7585c191376d898e3e66e35acd9bd777c2 (diff) | |
download | external_llvm-710ac0711fac5d6d64ca8eab5a100bf4578d21b9.zip external_llvm-710ac0711fac5d6d64ca8eab5a100bf4578d21b9.tar.gz external_llvm-710ac0711fac5d6d64ca8eab5a100bf4578d21b9.tar.bz2 |
extend ArgOperand interface: setArgOperand
(in both CallInst and InvokeInst)
also add a (short-lived) constant to CallInst, that names
the operand index of the first call argument. This is
strictly transitional and should not be used for new code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107001 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Instructions.h')
-rw-r--r-- | include/llvm/Instructions.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index 6e6a1a6..29c36e0 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -943,8 +943,10 @@ public: /// Provide fast operand accessors DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); + enum { ArgOffset = 1 }; ///< temporary, do not use for new code! unsigned getNumArgOperands() const { return getNumOperands() - 1; } - Value *getArgOperand(unsigned i) const { return getOperand(i + 1); } + Value *getArgOperand(unsigned i) const { return getOperand(i + ArgOffset); } + void setArgOperand(unsigned i, Value *v) { setOperand(i + ArgOffset, v); } /// getCallingConv/setCallingConv - Get or set the calling convention of this /// function call. @@ -2440,6 +2442,7 @@ public: unsigned getNumArgOperands() const { return getNumOperands() - 3; } Value *getArgOperand(unsigned i) const { return getOperand(i); } + void setArgOperand(unsigned i, Value *v) { setOperand(i, v); } /// getCallingConv/setCallingConv - Get or set the calling convention of this /// function call. |