Avoid !sized assertion failure if Ty is not a sized type

llvm-svn: 2933
This commit is contained in:
Chris Lattner 2002-07-16 22:29:37 +00:00
parent 811bd41229
commit 4cccad7555
1 changed files with 2 additions and 1 deletions

View File

@ -756,7 +756,8 @@ static bool OperandConvertableToType(User *U, Value *V, const Type *Ty,
}
// Must move the same amount of data...
if (TD.getTypeSize(ElTy) != TD.getTypeSize(I->getOperand(0)->getType()))
if (!ElTy->isSized() ||
TD.getTypeSize(ElTy) != TD.getTypeSize(I->getOperand(0)->getType()))
return false;
// Can convert store if the incoming value is convertable...