diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index c253e815883..4471cfde34d 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -2316,8 +2316,7 @@ Constant *ConstantExpr::getInsertElement(Constant *Val, Constant *Elt, && "Insertelement types must match!"); assert(Idx->getType() == Type::Int32Ty && "Insertelement index must be i32 type!"); - return getInsertElementTy(cast(Val->getType())->getElementType(), - Val, Elt, Idx); + return getInsertElementTy(Val->getType(), Val, Elt, Idx); } Constant *ConstantExpr::getShuffleVectorTy(const Type *ReqTy, Constant *V1,