summaryrefslogtreecommitdiff
path: root/include/llvm/Instructions.h
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-07-16 09:38:02 +0000
committerGabor Greif <ggreif@gmail.com>2010-07-16 09:38:02 +0000
commita6aac4c5bc22bb10c7adb11eee3f82c703af7002 (patch)
tree3e7c2b5a7329eab2f2db6cd575a6da0e0aa5812a /include/llvm/Instructions.h
parent10bb4211d69a643e380c537cbc75745c5fea6d6a (diff)
downloadllvm-a6aac4c5bc22bb10c7adb11eee3f82c703af7002.tar.gz
llvm-a6aac4c5bc22bb10c7adb11eee3f82c703af7002.tar.bz2
llvm-a6aac4c5bc22bb10c7adb11eee3f82c703af7002.tar.xz
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.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index af93a294cc..e279b34d42 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: