From 23014c9b00be6bd963279bec8906d3767466c2d5 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 16 Jul 2002 22:29:37 +0000 Subject: [PATCH] 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 --- lib/Transforms/ExprTypeConvert.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Transforms/ExprTypeConvert.cpp b/lib/Transforms/ExprTypeConvert.cpp index eea8607ed08..d7caa2e86a9 100644 --- a/lib/Transforms/ExprTypeConvert.cpp +++ b/lib/Transforms/ExprTypeConvert.cpp @@ -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... -- 2.34.1