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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2933 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-07-16 22:29:37 +00:00
parent 3fb2ddd368
commit 23014c9b00

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...