Fix the linker. This bug was not fun to track down. grr
authorChris Lattner <sabre@nondot.org>
Sat, 3 Nov 2001 03:26:47 +0000 (03:26 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 3 Nov 2001 03:26:47 +0000 (03:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1090 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/iMemory.h

index 4e50f30bebc00823b284d66dbd9b357121406153..7b522c5c50b5afe1bce1c6d3b10133f92431b5b0 100644 (file)
@@ -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"; }