Fix bug: Regression/Other/2002-03-11-ExprAssertion.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7046 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-07-01 21:08:52 +00:00
parent 7b702b81ee
commit 5fd60913da

View File

@ -317,7 +317,9 @@ ExprType ClassifyExpression(Value *Expr) {
if (isa<PointerType>(DestTy))
DestTy = Type::ULongTy; // Pointer types are represented as ulong
if (!Src.getExprType(0)->isLosslesslyConvertibleTo(DestTy)) {
const Type *SrcValTy = Src.getExprType(0);
if (!SrcValTy) return I;
if (!SrcValTy->isLosslesslyConvertibleTo(DestTy)) {
if (Src.ExprTy != ExprType::Constant)
return I; // Converting cast, and not a constant value...
}