Use cast<> instead of dyn_cast + assert

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212380 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Matt Arsenault 2014-07-05 21:16:43 +00:00
parent 9363b585ce
commit f92e09efd3

View File

@ -119,8 +119,7 @@ void SITypeRewriter::visitCallInst(CallInst &I) {
Type::getInt32Ty(I.getContext())){
Type *ElementTy = Arg->getType()->getVectorElementType();
std::string TypeName = "i32";
InsertElementInst *Def = dyn_cast<InsertElementInst>(Arg);
assert(Def);
InsertElementInst *Def = cast<InsertElementInst>(Arg);
Args.push_back(Def->getOperand(1));
Types.push_back(ElementTy);
std::string VecTypeName = "v1" + TypeName;