diff options
| author | Gabor Greif <ggreif@gmail.com> | 2010-07-16 09:38:02 +0000 |
|---|---|---|
| committer | Gabor Greif <ggreif@gmail.com> | 2010-07-16 09:38:02 +0000 |
| commit | 414c6c091ce59a65c7dff605e43a05b89aa0792d (patch) | |
| tree | 3e7c2b5a7329eab2f2db6cd575a6da0e0aa5812a /include/llvm/Instructions.h | |
| parent | d557b954a8fb8f563779d364bdce33e62885af2f (diff) | |
| download | external_llvm-414c6c091ce59a65c7dff605e43a05b89aa0792d.zip external_llvm-414c6c091ce59a65c7dff605e43a05b89aa0792d.tar.gz external_llvm-414c6c091ce59a65c7dff605e43a05b89aa0792d.tar.bz2 | |
eliminate CallInst::ArgOffset
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108522 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Instructions.h')
| -rw-r--r-- | include/llvm/Instructions.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index af93a29..e279b34 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -964,10 +964,9 @@ public: # undef protected public: - enum { ArgOffset = 0 }; ///< temporary, do not use for new code! unsigned getNumArgOperands() const { return getNumOperands() - 1; } - Value *getArgOperand(unsigned i) const { return getOperand(i + ArgOffset); } - void setArgOperand(unsigned i, Value *v) { setOperand(i + ArgOffset, v); } + 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. @@ -1056,17 +1055,17 @@ public: /// indirect function invocation. /// Function *getCalledFunction() const { - return dyn_cast<Function>(Op<ArgOffset -1>()); + return dyn_cast<Function>(Op<-1>()); } /// getCalledValue - Get a pointer to the function that is invoked by this /// instruction. - const Value *getCalledValue() const { return Op<ArgOffset -1>(); } - Value *getCalledValue() { return Op<ArgOffset -1>(); } + const Value *getCalledValue() const { return Op<-1>(); } + Value *getCalledValue() { return Op<-1>(); } /// setCalledFunction - Set the function called. void setCalledFunction(Value* Fn) { - Op<ArgOffset -1>() = Fn; + Op<-1>() = Fn; } // Methods for support type inquiry through isa, cast, and dyn_cast: |
