aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/iMemory.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/iMemory.h b/include/llvm/iMemory.h
index 4e50f30beb..7b522c5c50 100644
--- a/include/llvm/iMemory.h
+++ b/include/llvm/iMemory.h
@@ -79,7 +79,7 @@ public:
virtual Instruction *clone() const {
return new MallocInst(getType(),
- Operands.size() ? (Value*)Operands[1].get() : 0);
+ Operands.size() ? (Value*)Operands[0].get() : 0);
}
virtual const char *getOpcodeName() const { return "malloc"; }
@@ -106,7 +106,7 @@ public:
virtual Instruction *clone() const {
return new AllocaInst(getType(),
- Operands.size() ? (Value*)Operands[1].get() : 0);
+ Operands.size() ? (Value*)Operands[0].get() : 0);
}
virtual const char *getOpcodeName() const { return "alloca"; }