Fix warning when assertions disabled.
[oota-llvm.git] / lib / VMCore / Instructions.cpp
index 604f9f94a1c178b601357a31671646d72918687c..3421292930d490f4995e436b2357ce21a35cf386 100644 (file)
@@ -1385,6 +1385,8 @@ InsertValueInst::InsertValueInst(const InsertValueInst &IVI)
   : Instruction(IVI.getType(), InsertValue,
                 OperandTraits<InsertValueInst>::op_begin(this), 2),
     Indices(IVI.Indices) {
+  Op<0>() = IVI.getOperand(0);
+  Op<1>() = IVI.getOperand(1);
 }
 
 InsertValueInst::InsertValueInst(Value *Agg,
@@ -1461,9 +1463,8 @@ const Type* ExtractValueInst::getIndexedType(const Type *Agg,
 }
 
 const Type* ExtractValueInst::getIndexedType(const Type *Agg,
-                                             const unsigned Idx) {
-  const unsigned Idxs[1] = { Idx };
-  return getIndexedType(Agg, &Idxs[0], 1);
+                                             unsigned Idx) {
+  return getIndexedType(Agg, &Idx, 1);
 }
 
 ExtractValueInst::ExtractValueInst(Value *Agg,