diff options
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: |