diff --git a/llvm/lib/VMCore/Instructions.cpp b/llvm/lib/VMCore/Instructions.cpp index f33e2dd449ad..cf79b6fe60df 100644 --- a/llvm/lib/VMCore/Instructions.cpp +++ b/llvm/lib/VMCore/Instructions.cpp @@ -1010,7 +1010,7 @@ void GetElementPtrInst::init(Value *Ptr, Value *Idx) { } GetElementPtrInst::GetElementPtrInst(const GetElementPtrInst &GEPI) - : Instruction(reinterpret_cast(GEPI.getType()), GetElementPtr, + : Instruction(GEPI.getType(), GetElementPtr, OperandTraits::op_end(this) - GEPI.getNumOperands(), GEPI.getNumOperands()) { @@ -1355,7 +1355,7 @@ void InsertValueInst::init(Value *Agg, Value *Val, Value *Idx) { } InsertValueInst::InsertValueInst(const InsertValueInst &IVI) - : Instruction(reinterpret_cast(IVI.getType()), InsertValue, + : Instruction(IVI.getType(), InsertValue, OperandTraits::op_end(this) - IVI.getNumOperands(), IVI.getNumOperands()) {