summaryrefslogtreecommitdiff
path: root/include/llvm/IntrinsicInst.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-10-12 04:45:20 +0000
committerChris Lattner <sabre@nondot.org>2004-10-12 04:45:20 +0000
commit84e48b860d9d864ccdbfa9c7b35a9ee4d74650f6 (patch)
tree559f53bf719664e908f6bc6700f3744e322ae253 /include/llvm/IntrinsicInst.h
parenta28809d1fd5503f8038b336dfa55d8fc93a1f340 (diff)
downloadllvm-84e48b860d9d864ccdbfa9c7b35a9ee4d74650f6.tar.gz
llvm-84e48b860d9d864ccdbfa9c7b35a9ee4d74650f6.tar.bz2
llvm-84e48b860d9d864ccdbfa9c7b35a9ee4d74650f6.tar.xz
Right, calls have Operand#0 == the called function, don't forget this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16930 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/IntrinsicInst.h')
-rw-r--r--include/llvm/IntrinsicInst.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/include/llvm/IntrinsicInst.h b/include/llvm/IntrinsicInst.h
index b422901615..911ae1031f 100644
--- a/include/llvm/IntrinsicInst.h
+++ b/include/llvm/IntrinsicInst.h
@@ -46,11 +46,11 @@ namespace llvm {
/// MemIntrinsic - This is the common base class for memset/memcpy/memmove.
///
struct MemIntrinsic : public IntrinsicInst {
- Value *getRawDest() const { return const_cast<Value*>(getOperand(0)); }
+ Value *getRawDest() const { return const_cast<Value*>(getOperand(1)); }
- Value *getLength() const { return const_cast<Value*>(getOperand(2)); }
+ Value *getLength() const { return const_cast<Value*>(getOperand(3)); }
ConstantInt *getAlignment() const {
- return cast<ConstantInt>(const_cast<Value*>(getOperand(3)));
+ return cast<ConstantInt>(const_cast<Value*>(getOperand(4)));
}
/// getDest - This is just like getRawDest, but it strips off any cast
@@ -63,18 +63,18 @@ namespace llvm {
void setDest(Value *Ptr) {
assert(getRawDest()->getType() == Ptr->getType() &&
"setDest called with pointer of wrong type!");
- setOperand(0, Ptr);
+ setOperand(1, Ptr);
}
void setLength(Value *L) {
assert(getLength()->getType() == L->getType() &&
"setLength called with value of wrong type!");
- setOperand(2, L);
+ setOperand(3, L);
}
void setAlignment(ConstantInt *A) {
assert(getAlignment()->getType() == A->getType() &&
"setAlignment called with value of wrong type!");
- setOperand(3, A);
+ setOperand(4, A);
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -101,7 +101,7 @@ namespace llvm {
struct MemCpyInst : public MemIntrinsic {
/// get* - Return the arguments to the instruction.
///
- Value *getRawSource() const { return const_cast<Value*>(getOperand(1)); }
+ Value *getRawSource() const { return const_cast<Value*>(getOperand(2)); }
/// getSource - This is just like getRawSource, but it strips off any cast
/// instructions that feed it, giving the original input. The returned
@@ -112,7 +112,7 @@ namespace llvm {
void setSource(Value *Ptr) {
assert(getRawSource()->getType() == Ptr->getType() &&
"setSource called with pointer of wrong type!");
- setOperand(1, Ptr);
+ setOperand(2, Ptr);
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -136,7 +136,7 @@ namespace llvm {
struct MemMoveInst : public MemIntrinsic {
/// get* - Return the arguments to the instruction.
///
- Value *getRawSource() const { return const_cast<Value*>(getOperand(1)); }
+ Value *getRawSource() const { return const_cast<Value*>(getOperand(2)); }
/// getSource - This is just like getRawSource, but it strips off any cast
/// instructions that feed it, giving the original input. The returned
@@ -146,7 +146,7 @@ namespace llvm {
void setSource(Value *Ptr) {
assert(getRawSource()->getType() == Ptr->getType() &&
"setSource called with pointer of wrong type!");
- setOperand(1, Ptr);
+ setOperand(2, Ptr);
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -170,12 +170,12 @@ namespace llvm {
struct MemSetInst : public MemIntrinsic {
/// get* - Return the arguments to the instruction.
///
- Value *getValue() const { return const_cast<Value*>(getOperand(1)); }
+ Value *getValue() const { return const_cast<Value*>(getOperand(2)); }
void setValue(Value *Val) {
assert(getValue()->getType() == Val->getType() &&
"setSource called with pointer of wrong type!");
- setOperand(1, Val);
+ setOperand(2, Val);
}
// Methods for support type inquiry through isa, cast, and dyn_cast: