diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index d537e708838..7a17d06ff6a 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -103,8 +103,7 @@ bool Type::isLosslesslyConvertableTo(const Type *Ty) const { case Type::ULongTyID: case Type::LongTyID: case Type::PointerTyID: - return Ty == Type::ULongTy || Ty == Type::LongTy || - Ty->getPrimitiveID() == Type::PointerTyID; + return Ty == Type::ULongTy || Ty == Type::LongTy || isa(Ty); default: return false; // Other types have no identity values }