aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-07-16 22:29:37 +0000
committerChris Lattner <sabre@nondot.org>2002-07-16 22:29:37 +0000
commit23014c9b00be6bd963279bec8906d3767466c2d5 (patch)
tree16e383175e64a8a74de430b5898022d39a389893 /lib/Transforms
parent3fb2ddd368828fbb73ebef98c5b88dc30822dca9 (diff)
downloadexternal_llvm-23014c9b00be6bd963279bec8906d3767466c2d5.zip
external_llvm-23014c9b00be6bd963279bec8906d3767466c2d5.tar.gz
external_llvm-23014c9b00be6bd963279bec8906d3767466c2d5.tar.bz2
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
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/ExprTypeConvert.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/ExprTypeConvert.cpp b/lib/Transforms/ExprTypeConvert.cpp
index eea8607..d7caa2e 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...